Browser Script “on the fly”

May 20th, 2008

Top tip today from Neel over at Siebel Unleashed: using the IE address bar to enter browser script.

I’ve never thought of this, and the key point is worth repeating: script entered into the address bar after a javascript tag is executed by the browser, in exactly the same way as browser script. This means that if you edit the address to be:

javascript:alert(theApplication().GetProfileAttr("Me.First Name"));

…then the browser will popup a message box with the value of the First Name attribute - exactly as you’d expect if this statement was in browser script. Much faster than navigating to Administration - Personalization > Test, plus it retains current context.

Nice quick-and-dirty hack to check (or set) the value of browser objects. Good work, Neel!

Entry Filed under: Configuration, Scripting, Siebel

2 Comments Add your own

  • 1. Gavin  |  June 7th, 2008 at 4:04 am

    That tip was just in time to debug some funky browser script that relied on setting profile attributes. Our test env is fine, but prod wasn’t. Knowing that the attributes were blank make a lot of sense.

    Boy, i hate browser script. It should be banned outright as it makes debugging just an evil process.

  • 2. Andrew  |  June 10th, 2008 at 11:44 pm

    This is, by far, one of the most useful debugging hacks ever.

    Although I have yet to use it in the field, the benefits are obvious.

    Thanks!

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

May 2008
M T W T F S S
« Apr    
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts