Javascript anchor problem

I am having a problem with one of my pages. When a user goes
to a page I wish to have a hidden div be open based on the URL that
they come in as (they have #anchors). I tried using the
(location.hash) but could not get it to work.
For example if the url is www.mysite.com/bob.php#section1, I
would like the section 1 div to be open when they arrive. The pages
typically have dozens of anchors and hidden stuff.
Here is the javascript I am using to show and hide the div
sections:
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
return true;
and what is typically on the page:
<a href="javascript:void(0)" onClick="return
toggleMe('section1')">section1</a>
<table id="section1" style="display: none;" border="0"
cellpadding="0" cellspacing="0">
<tbody><tr>
<td>text text text </td>
</tr></tbody></table>
Any help would be greatly appreciated

I am having a problem with one of my pages. When a user goes
to a page I wish to have a hidden div be open based on the URL that
they come in as (they have #anchors). I tried using the
(location.hash) but could not get it to work.
For example if the url is www.mysite.com/bob.php#section1, I
would like the section 1 div to be open when they arrive. The pages
typically have dozens of anchors and hidden stuff.
Here is the javascript I am using to show and hide the div
sections:
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
return true;
and what is typically on the page:
<a href="javascript:void(0)" onClick="return
toggleMe('section1')">section1</a>
<table id="section1" style="display: none;" border="0"
cellpadding="0" cellspacing="0">
<tbody><tr>
<td>text text text </td>
</tr></tbody></table>
Any help would be greatly appreciated

Similar Messages

  • Javascript security problem in IE/Netscape

    I am facing with the javascript security problem in IE/Netscape. I have solved this problem partially, but there are more issues involved.
    Here's the scenario:
    There is an HTML page on client's hard disk (main.htm) containing two frames:
    frame 1 contains a page that lies that is deployed from my server, say
    src="http://127.0.0.1:8080/MyApplication.htm"
    frame 2 contains a page that lies on the client's server, say
    src="http://www.clientside.com/clientPage.htm"
    My page in frame 1 wants to access the URL of the page in frame 2 (through a button click, say ). This is done in MyApplication.htm through javascript as:
    window.parent.frame2.location.href;
    Now when the above line is executed, i get the following error:
    In IE(5.0): "permission denied"
    In Netscape(4.7): "access disallowed from scripts at http://127.0.0.1:8080/MyApplication.htm to documents at another domain."
    (which is understandable)
    I have partially solved the above problem in Netscape, by granting access permissions to MyApplication.htm (page on my server) to access the
    "http://www.clientside.com/clientPage.htm" page at client's domain.
    This is done as follows:
    1. First enable code base principals in client's Netscape by adding the following line in prefs.js file of Netscape
    "user_pref("signed.applets.codebase_principal_support", true);"
    2. Secondly i must add the following line in java script of "MyApplication.htm"
    "netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserAccess");"
    Now when the client clicks the button on my frame he'll get a netscape window asking him to grant permissions to MyApplication.htm.
    After granting permission, MyApplication.htm can retrieve the URL of clientPage.htm (even if he browses to another url)
    As you can see this problem is solved partially, but i want that the page "main.htm" (which is now on the client's hard disk),
    must be deployed at client's server (in which case not even the above technique works).........what should i do? any alternates or other solution?
    Secondly i want this to work with IE too, (which should according to their documentation, but does not and is therfore a big IE bug-as mentioned on the net)
    Any sort of help in this case would greatly appreciated.
    Thanks
    Faisal Moin Khan

    i believe you are posting in the wrong forum.
    This forum is foro XML web services.

  • Cross-Reference using Text Anchor problems

    I am having problems with creating "New Cross-Reference" using a "Text Anchor" in CS4 Indesign.
    I can mimic what I want using a "Link to Paragraph", selecting the paragraph style and link, and then using the "Partial paragraph and Page Number" options.
    I would prefer doing this using a Text Anchor.
    I've tried creating a text hyperlink, but in whatever I am doing, I never get any "Text Anchor" OPTIONS in the New Cross-Reference menu.
    Adobe should also change the Text Anchor menu item, since there are "Text Anchor" options in InDesign that appear to have nothing to do with Cross-Referencing.
    The other problem I am having is that in defining the open-quote and closed-quotes around the Paragraph Text variable, I wish to have typesetter's quotes instead of the default vertical quotes. If I use the Splat button to choose ^{^} options, then I get funky "G"'s in my reference instead of typesetters quotes -- even if I choose a "Character Sytle for Cross Reference" and force it to my current font choice. What's going on here?
    SC

    Hi, Seir:
    I agree that it's confusing. Here's how I do it:
    To create a text anchor at the insertion point location:
    * Open the Hyperlinks/Cross-References panel's menu (also called "flyout menu." It's the small icon at the upper-right of the panel, below the double-arrow (>>) icon that collapses the panel.
    * Choose New Hyperlink Destination. THIS SHOULD BE NAMED NEW TEXT ANCHOR!!!
    * Choose Type: Text Anchor
    * Name the anchor as you like Click OK.
    To create a cross-reference to a text anchor:
    * Place the insertion point where you want it.
    * Click the Create new Cross-Reference button on the bottom of the Hyperlinks/Cross-Reference panel.
    * Choose Link To: Text Anchor
    * Choose the target document
    * Choose the text anchor
    * Choose the Cross-Reference format
    * Choose Appearance properties
    * Click OK
    I'm not sure what could cause the straight/curly quotes problem other than perhaps the font doesn't have curly quotes. Have you tried other fonts?
    HTH
    Regards,
    Peter Gold
    KnowHow ProServices

  • Javascript menu problems in IE

    Hi
    I am using a javascript menu for a website I am trying to
    build, I have tested it on many browsers and thought it was working
    fine, it's fine on all the macintosh browsers, works fine on
    firefox on the PC but there seems to be problems on some versions
    of IE. Especially runing XP but am not sure about vista.
    You dont seem to be able to see the menu when the page loads,
    you can see something is there and the buttons show when you hover
    over them, but they are kicked out of place.
    here is the code if it helps
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    <title>Ecoligical Planning and Research
    Ltd</title>
    <link href="epr.css" rel="stylesheet" type="text/css"
    />
    <script src="Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    </head>
    <body bgcolor="#cfdcce">
    <table width="800" border="0" align="center"
    bgcolor="#FFFFFF" class="greenborderoutline">
    <tr>
    <th height="29" align="left" scope="col"><div
    class="menu" id="menu">
    <script type='text/javascript'
    src='quickmenu.js'></script></div></th>
    </tr>
    <tr>
    <td height="132"><script type="text/javascript">
    AC_FL_RunContent( 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','nam e','eprbanner','width','800','height','168','id','eprbanner','title','banner','src','eprba nner','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','wmode' ,'transparent','movie','eprbanner'
    ); //end AC code
    </script><noscript><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    name="eprbanner" width="800" height="168" id="eprbanner"
    title="banner">
    <param name="movie" value="eprbanner.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="eprbanner.swf" width="800" height="168"
    quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" wmode="transparent"
    name="eprbanner"></embed>
    </object>
    </noscript></td>
    </tr>
    <tr>
    <td height="304" valign="top"><table width="798"
    height="131" border="0">
    <tr>
    <th width="513" scope="col"><p
    class="bodycopyHomepage"><strong>Ecological Planning
    &amp; Research Ltd</strong> is
    <th width="275" scope="col"><span
    style="margin:0px"><img src="images/office.jpg" alt="Head
    Office" name="eprOffice" width="241" height="296" align="left"
    id="eprOffice" /></span></th>
    </tr>
    </table> </td>
    </tr>
    <tr>
    <td height="105"><img src="images/btBanner.gif"
    alt="btBanner" width="800" height="103" align="top"
    /></td>
    </tr>
    </table>
    <table width="800" align="center" border="0">
    <tr>
    <th scope="col"><div align="left"
    class="copyright">&copy;<strong> 2007</strong>
    Ecological Planning and Research Ltd </div></th>
    </tr>
    </table>
    <p> </p>
    </body>
    </html>
    any help here would be great as I am really stuck
    many thanks
    Jon

    Gad. Ask the authors of the menu for help. Would you REALLY
    use something
    like that on a web page?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "ronnyrocket" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi
    >
    > I am using a javascript menu for a website I am trying
    to build, I have
    > tested
    > it on many browsers and thought it was working fine,
    it's fine on all the
    > macintosh browsers, works fine on firefox on the PC but
    there seems to be
    > problems on some versions of IE. Especially runing XP
    but am not sure
    > about
    > vista.
    >
    > You dont seem to be able to see the menu when the page
    loads, you can see
    > something is there and the buttons show when you hover
    over them, but they
    > are
    > kicked out of place.
    >
    > here is the code if it helps
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    > <title>Ecoligical Planning and Research
    Ltd</title>
    > <link href="epr.css" rel="stylesheet" type="text/css"
    />
    > <script src="Scripts/AC_RunActiveContent.js"
    > type="text/javascript"></script>
    > </head>
    >
    > <body bgcolor="#cfdcce">
    > <table width="800" border="0" align="center"
    bgcolor="#FFFFFF"
    > class="greenborderoutline">
    > <tr>
    > <th height="29" align="left" scope="col"><div
    class="menu" id="menu">
    > <script type='text/javascript'
    src='quickmenu.js'></script></div></th>
    > </tr>
    > <tr>
    > <td height="132"><script
    type="text/javascript">
    > AC_FL_RunContent(
    > 'codebase','
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
    >
    version=7,0,19,0','name','eprbanner','width','800','height','168','id','eprbanne
    >
    r','title','banner','src','eprbanner','quality','high','pluginspage','
    http://www
    >
    .macromedia.com/go/getflashplayer','wmode','transparent','movie','eprbanner'
    > );
    > //end AC code
    > </script><noscript><object
    > classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
    > rsion=7,0,19,0" name="eprbanner" width="800"
    height="168" id="eprbanner"
    > title="banner">
    > <param name="movie" value="eprbanner.swf" />
    > <param name="quality" value="high" />
    > <param name="wmode" value="transparent" />
    > <embed src="eprbanner.swf" width="800" height="168"
    quality="high"
    > pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    > type="application/x-shockwave-flash" wmode="transparent"
    > name="eprbanner"></embed>
    > </object>
    > </noscript></td>
    > </tr>
    > <tr>
    > <td height="304" valign="top"><table
    width="798" height="131"
    > border="0">
    > <tr>
    > <th width="513" scope="col"><p
    > class="bodycopyHomepage">
    Ecological
    > Planning &amp; Research Ltd is
    > <th width="275" scope="col"><span
    style="margin:0px"><img
    > src="images/office.jpg" alt="Head Office"
    name="eprOffice" width="241"
    > height="296" align="left" id="eprOffice"
    /></span></th>
    > </tr>
    > </table> </td>
    > </tr>
    > <tr>
    > <td height="105"><img src="images/btBanner.gif"
    alt="btBanner"
    > width="800"
    > height="103" align="top" /></td>
    > </tr>
    > </table>
    >
    > <table width="800" align="center" border="0">
    > <tr>
    > <th scope="col"><div align="left"
    class="copyright">&copy;
    2007
    > Ecological Planning and Research Ltd
    </div></th>
    > </tr>
    > </table>
    > <p> </p>
    > </body>
    > </html>
    >
    >
    > any help here would be great as I am really stuck
    >
    > many thanks
    >
    > Jon
    >

  • JavaScript Console Problem (only in LS preview mode)

    Hello,
    my JavaScript console "crashes" in preview-mode in lifecycle designer. It just appears for a "millisecond"´, well I see it flicker at last.
    It doesn't matter if there is a syntax error or if I try to start the console by clicking a button ( Event click => console.show(); )
    The console just flickers.
    If I save the pdf file everything works fine. Console shows up on errors or if it told to do so (e.g. my button is clicked).
    I cannot afford to save the pdf-file every time for some reasons (livecycle designer is used in sap gui, I have to run the whole process to get the PDF ...)
    By the way, the same problem is present in Livecycle Designer if I use it "native", not called from within the sap.
    I have already tried to close the acrobat reader tasks. There are two of them, when adobe reader 10 starts (native or in livecycle-preview).
    But by closing one of the tasks, the second one closes, too. Therefore there is no help this way.
    I use Adobe Lifecycle Designer ES 8.0 (8.01.2008.1.380548) and Acrobat Reader X (10.0.1)
    The PDFs output in LS is set to Acrobat 8 (dynamic)
    In Acrobat Reader javascript console/debugger is set as active, as well as to show errors etc.
    It might be a problem realted to sap gui.
    I just ran the pdf-preview in sap gui. And Console didn't show up again.
    I have saved the same document from the sap print-preview on my local hd drive. Then started it with adobe reader and everything worked just fine.
    Please do not blame sap only. As I have told before: the same problem occurs if I use livecycle designer "native", not within sap gui

    nikg-fh schrieb:
    it seems the problem is caused directly by adobe reader X.
    I just have started a new descussion here (adobe reader forum).
    If anyone could help me, feel free to do so!
    my configuration:
    windows xp pro
    adobe reader x
    adobe livecycle designer 9 ( therefore it is not an version 8 issue )
    admin rights on the pc ; )
    I might add that you are not alone!
    I am having the same problem (LSD ES2 (version 9.0.0....) and Adobe Reader X and Acrobat Professional 8)
    Whenever I save a form as PDF and open it with Reader or Acrobat I get to see the console.
    But never when I view the form in Designer preview!
    That used to work until I installed Reader X.
    Same as you I checked all configurations in Reader and Acrobat: all perfect.
    I really do hope that someone finds a solution for this.
    PS. This problem should be discussed in THIS forum. It is clearly a Designer problem!

  • Javascript alert problem - select state

    I am trying to validate my form with javascript. I'm having
    trouble with my state field. If the user selects a state javascript
    alerts the following message: "SELECT ONE is not a valid choice.
    Please choose your state." I want the alert message to pop up if
    select one is selected as a state. How do I fix this problem?

    pqer wrote:
    > I am trying to validate my form with javascript. I'm
    having trouble with my
    > state field. If the user selects a state javascript
    alerts the following
    > message: "SELECT ONE is not a valid choice. Please
    choose your state." I want
    > the alert message to pop up if select one is selected as
    a state. How do I fix
    > this problem?
    >
    >
    >
    > <script language="javascript"
    type="text/javascript">
    >
    > // check to see if the form is blank
    > function validForm(contactUs) {
    >
    >
    > if(contactUs.state.value != "SELECT ONE") {
    > alert("SELECT ONE is not a valid choice. Please choose
    your state.")
    > contactUs.state.focus()
    > return false
    > }
    if(!contactUs.state.selectedIndex) {
    alert("SELECT ONE is not a valid choice. Please choose your
    state.");
    contactUs.state.focus();
    return false;
    Mick
    >
    > </script>
    >

  • C3 double anchor problem

    When inserting a link to an anchor on a page, users are able
    to browse to the part of the page they want using a link which
    already points to the anchor e.g. <a
    href="anypage.htm#anchor1">First link to anchored
    text</a>. If they do that the newly created link is instantly
    uneditable and cannot be deleted even while still in editing mode
    in Contribute 3. It has to be removed by someone with Dreamweaver.
    I know this is the wrong way to select a page anchor and user
    training covers this but users still get it wrong. Is this a bug
    and is there a way for this problem to be resolved by the user ?
    Thanks to anyone who can help.
    Code is from Contribute created page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>2xAnchorTest2</title>
    </head>
    <body>
    <a href="anypage.htm#anchor1#anchor1">Can't delete or
    edit this link</a>
    </body>
    </html>

    For device slowing down you can take the following actions-
    1. Clear the browser cache.
    2. Move the content from the phone memory to the memory card.
    3. Take a backup of all the messages using Nokia suite & delete the excess so that you can free up some memory. In future do not let the message count to go beyond 500 so the phone functions remain smooth. Please note that depending on the number of messages the backup & delete may take even hours.
    4. Try using a theme that is smaller in size. The larger the theme size the slower the device becomes.
    5. If still the problem persists you can reinstall the current firmware using Nokia Suite. But do take a complete back up of the phone or else you will lose all your data. Also if you've set a password on the memory card & do not remember it then do take a back up of card content also as after firmware reinstallation you will not be able to unlock the card without formatting it.
    Please mark the post as solution if it solves your problem.
    Current Device - Nokia Lumia 1020/920

  • Pl/sql encoding javascript parameter problem

    I am using an html form to get user input via radio buttons via the following segment
    htp.p('<input type="radio" value="a" onSelect="saySomething('fish')">');
    However, when the brackets surrounding (fish) are encountered an error occurs
    Line No. 41 : PLS-00103: Encountered the symbol "FISH" when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in mod not range rem => ..
    <an exponent (**)> <> or != or ~= >= <= <> and or like as
    between from using is null is not || is dangling
    The symbol ". was inserted before "FISH" to continue.
    (WWV-17050)
    ORA-24344: success with compilation error (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-)
    Is there a better way to program user input or how can I overcome the javascript parameter passing problem
    Many regards
    Eddie

    To include single quotes into literal strings in SQL and PL/SQL, you need to escape (double) them or replace them with concatenations with CHR(39):
    htp.p('<input type="radio" value="a" onSelect="saySomething(''fish'')">');
    or
    htp.p('<input type="radio" value="a" onSelect="saySomething('||chr(39||'fish'||chr(39||')">');

  • Validate long date in javascript & OnSubmit problem

    hi i need to validate long date format "E, dd MMM yyyy HH:mm:ss" or Thu, 18 Jul 2002 12:52:49 that is key in by the user. but i'm not sure how to do this. i have couples of input data and i'm passing an object to the javascript function validateform using OnSubmit. Which one is better, using OnSubmit or OnCick for this kind of parameter passing. Eg <form method="POST" action="insert.jsp" onSubmit="return validateForm(this)"> However i'm having a problem where when there is an invalid input from the user, it will notify the user but it will also send the form to the insert.jsp at the same time. Therefore the user can't correct the invalid data. The function return false for valid input and true for invalid. Please help!!! urgent.... thanks in advance

    Your problem is you have used
    <input type="submit" onClick="OnSubmit();">
    this won't work.
    Instead try
    <input type="button" value="someValue" onClick="OnSubmit();">
    This may help. All the best.

  • WLC (Foreign-Anchor), problem with the external web auth -- ISE

    hello guys
    I am currently designing a platform for a guest network, which must be isolated from the local network, the following equipment:
    ISE 1.2 (Cisco SNS- 3415-K9)
    WLC 7.0.230.0 (Cisco controller 5508)---> wlc Foreign
    WLC 7.0.230.0 (Cisco controller 5508)---> wlc Anchor.
    The EoIP tunnel between wlc is performed successfully.
    The wireless client gets IP address of the anchor wlc (DHCP server).
    Test 1:
    I configure the WLC ANCHOR with local web authentication (internal), the wireless client is authenticated by WLC and navigate successfully.
    Test 2:
    Configure the WLC to anchor external web authentication (ISE). configure a user in ISE guest portal.
    The wireless client gets IP address of the anchor wlc (DHCP server), attempting to navigate not display the guest portal.
    Debug a wireless client trying to connect to the guest network is attached.

    Thanks for your help Scott...
    Now I presents another problem with the guest portal page. The wireless client obtains IP address and managed to reach the guest portal page, then enter the username and password page tells me it was successful. When I try to browse again brings me to the portal visitor page and asks me to enter user name and password.
    test 1:
    the username and password created for away was verified.
    Scoot will have some implementation details with the same scenario I am developing? I think I'm missing some details in the ISE does not allow me to navigate the entrance for visitors to be successful.

  • IFRAME scroll to anchor problem

    I am having difficulty using IFRAME and anchors. When I place
    an anchor within the IFRAME and then click to go to that anchor,
    the parent page scrolls to the IFRAME's location on the screen and
    the IFRAME scrolls to that anchor. How do I make the IFRAME, and
    only the IFRAME, scroll to the anchor?
    We have a User Acceptance Test site located at
    uat.itclarity.co.uk/our_services2.html where you can see our
    problem by clicking on the 'more' link.
    Any help would be gratefully received.

    There is nothing wrong with what you have shown us, hence the problem lies elsewhere.
    For us to help you without having to guess what you have done, it is important that you give us the whole picture such as giving us a URL to the site.
    However, very little can go wrong with the script and we can limit our guessing game to a few points, namely
    have you included the jQuery library?
    did you set the correct ID to the top reference?
    The following is what a correct version of the page will look like
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <div id="top">This is the top. Please scroll down to the 'Back to Top' link.</div>
    <div style="height: 1200px"></div>
    <a href="#top" class="anchorLink">Back to Top</a>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
      $(".anchorLink").click(function(e){
        e.preventDefault();
        var id    = $(this).attr("href");
        var offset = $(id).offset();
        $("html, body").animate({
          scrollTop: offset.top
        }, 100);
    </script>
    </body>
    </html>

  • JSP Session in JavaScript variable problem

    Hi,
    I have a session variable msgSize that is being set by a Java file in the session.
    aRequest.getSession().setAttribute("msgSize", msgSize);It's value is variable depends on record count of recordset.
    In JSP page where I have to assign it's value to a javascript variable. I am doing this a s follows. I have done this in the JSP file.
    <script type="text/javascript" >
    <!--
    function getVal()
    m=${msgSize};
    -->
    </script>First Problem is I am unable to get this value inside a External JS file. It throws error but inside jsp it is working. How can i use this inside External JS?
    Second problem is once the above code executed value never refreshed to new value?
    Means first time it executed it get value 200 next time again i executed the code the real recordset is 105 but still displaying 200. But when I restart the server next time it takes value 105 by itself....
    How I tackle this problem.?
    Regards,

    problem is I am not refreshing the whole JSP page everytime, only refreshing the partial page using ajax call that's why not getting the session new value...
    any suggestions what to do to get new value?

  • Air - JavaScript DOM problems

    Dear Air-friends,
    Have a look at this short html:
    <html>
    <head>
    <script type="text/javascript"
    src="AIRAliases.js"></script>
    <script>
    var i = 0;
    var click = function() {
    var a = document.createElement("a");
    a.innerHTML = "click me " + i++;
    a.setAttribute("href", "#");
    a.setAttribute("onclick", "click()");
    document.getElementById("body").replaceChild(a,
    document.getElementsByTagName("a")[0]);
    </script>
    </head>
    <body id="body" onload="click()">
    <a />
    </body>
    </html>
    when I run this using adl something strange happens:
    - I get a "click 0", after I click a "click 1" and ....
    that's it! no continuous "click 2", etc.
    I isolated this problem to this example, but actally I need
    it for context menus in my air application.
    Can someone help? I'm out of ideas.
    Thanks,
    Harrold Korte

    Hi Joe,
    First of all, thanks for your quick reply!
    Maybe I isolated the problem a bit too much. In fact, I'm
    creating context menus using xslt.
    Each time, a new context menu is put under a node called
    <div id="wrap-menu"> containing
    a <ul> of <a>s. It is in these subsequent
    refreshing of the context-menu (produced by xslt)
    where I observed this behaviour (first time ok, second time
    nop). Should I alter each <a> in the produced context-menu
    with addEventListener afterwards?
    I have the feeling that in that case I could didge xslt as
    well. Unfortunatly, I'm a big xslt fan to create
    html output (instead of all these program lines of unpacking
    and DOM manipulation). I'm porting an
    application from JS/PHP to Air because of the file system
    access which is exactly what I was looking for.
    Thanks again,
    Harrold Korte

  • External javascript variable problem

    QUESTION: Why would an external javascript variable be undefined if I set it equal to all the links in a page?
    BACKGROUND: I have a simple image swap function that works when the script is all in the html. But when I tried taking the script to an external javascript file, when I gather all the anchors on the page. The variable that is supposed to refer to the anchors is considered undefined in the middle of the script.
    EXAMPLE: I have place an example online. You may check it out. Please.
    Thanks!
    Message was edited by: UteFanJason

    So I checked out that link, and some information on scope. I got the function to work. Check it out.
    I did some more reading, and it turns out that the onload event is when the entire DOM has finished loading. (That is according to a book put out a couple of years ago so it could be different now).
    This is what I changed the the code to:
    function prepare_thumbs() {
        var main_img = document.getElementById('main_img');
        links = document.getElementsByTagName('a');
        for (x=0; x<links.length; x++) {
            links[x].onclick = function() {
                main_img.setAttribute('src', this.getAttribute('id'));
                return false;
    window.onload = prepare_thumbs;
    Again, thanks for the help!

  • Javascript-actionscript problems

    I am trying to set up a test app to get a grip on communications between
    javascript and action script. I have successfully registered a call back function
    with action script to be called by javascript, But a second registered function
    is not getting recognized by javascript. <object/embed object>.callBack()
    javascript error (FireFox on Mac)
    <object/embed object>.callBack is not a function
    The page is posted at
    http://www.jekillen.com/jekillen/content/web_design/player/FLSHDev.html
    javascript sourced file
    http://www.jekillen.com/jekillen/content/web_design/player/dev.js
    buttons labeled 'TEST' and 'TEST 1'
    There is a link to the swf source code (text file). Notice the compatibility note.
    Thanks for advice, suggestions.
    JK

    I think I found the problem here;
    I have to clear the browser cache occasionally to
    get changes in code to show up.
    That became obvious when things were happening that I
    had eliminated from the swf source code, in the browser.
    The sample I posted may actually work. The browser I
    use to contact internet does not have Flash player 10
    so I have not tested the posting.
    JK

Maybe you are looking for

  • Network host is busy

    I have a brand new Photosmart D110. Wireless appeared to install correctly, printer is visible on network, driver installed from the factory disk. I am on a MacBook, OSX 10.5.8 I can see the printer through the HP and web utlity pages, see toner leve

  • How do I get my music playlists back after the new update?

    After the new iTunes Update this week, the update deleted my personalized music playlists, went back to the default playlists, and all the albums I deleted doubles of songs are all back since the new update!  Is there a way to fix this or am I going

  • Re-install from upgrade license

    My mac has CS5 which was upgraded from CS3.  I need to reinstall to a new machine, gave the CS5 license number but it also wants the CS3 number, which I don't have any longer (we've had CS5 running since 2010).  What now?

  • Standby Server Problem

    Hi, I am using oracle 10gR1on windows.I have created a standby machine(Physical standby) and want to open in read only mode first time it is open in read only mode but after manually recovery want to open in read only mode.It is not open in read only

  • Recurring Document

    At time of customizing data on client server. When iam posting recurring document,the below message has been prompt. ''Document number SZ1 2005 was already assigned'' SZ = Company code