NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: bergsj on September 22, 2009, 02:28:33 AM
-
Hi,
I have a browse with a source as child beneath it. When the selection of the browse changes I woulk like the source to be refreshed (ajax-style). Can this be done?
-
Certainly.
If the source procedure has the setting
"Generate Ajax Div"
turned on, then it should be updated automatically when the browse row changes.
Cheers
Bruce
-
Bruce,
Indeed when I put only text inside this source, it worked fine. I tested with:
packet = 'ID =' & p_web.GSV('webOrd:Identifier')
But when I try this, the button is not updated:
packet = '<div id="buttondiv" class="buttondiv"><button type="button" name="btnCarrierInfo" id="btnCarrierInfo" value="CarrierInfo" class="MainButton" onclick="window.open(''frmOrderCarrierInfo?ORD__Identifier=' & p_web.GSV('webOrd:Identifier') & '&PressedButton=change_btn'');">Carrier Info [' & p_web.GSV('webOrd:Identifier') & ']</button></div>'
Any idea?
-Sjoerd
-
In almost all cases the problem is that the stuff you are hand-coding is not xHtml complient. The most common cause of this is "unclosed" tags, for example using <br> when you should have <br></br> - or <br /> for short.
You're ok on this front - at least overtly.
The second issue is that you are using a variable in the line which contains characters that are non-xhtml complaint. To handle this you can make use of the _jsok method. for example;
packet = '<div id="buttondiv" class="buttondiv"><button type="button" name="btnCarrierInfo" id="btnCarrierInfo" value="CarrierInfo" class="MainButton" onclick="window.open(''frmOrderCarrierInfo?ORD__Identifier=' & p_web._jsok(p_web.GSV('webOrd:Identifier')) & '&PressedButton=change_btn'');">Carrier Info [' & p_web,_jsok(p_web.GSV('webOrd:Identifier')) & ']</button></div>'
Cheers
Bruce
-
Bruce,
I did exactly that, but still nothing changes until I refresh the page myself.
Any clues?
-
It works with a simple string, but not with your button.
so maybe you need to build up your string one bit at a time
until you see why it stops working?
Cheers
Bruce