Results 1 to 2 of 2

Thread: help js in asp

  1. #1
    Join Date
    Feb 2006
    Posts
    34

    Unanswered: help js in asp

    I have a next.gif that when clicked should go a java script function in an included file

    in particular in a page i have,

    <A HREF="#" onclick="jumpto(mainform, this, 1, <%=maxSections%>; return false;"><img border=0 src="images/arrw01_01a.gif"></A>

  2. #2
    Join Date
    Feb 2006
    Posts
    34
    and i have

    <script Language="JavaScript"><!--

    function jumpto(f, theField, theValue, maxSection)
    {
    var thesection = 0;

    //var index;
    if (theValue == 0)
    {
    index = theField.selectedIndex;
    thesection = theField[index].value;
    }
    if (theValue == -1)
    thesection = parseInt(f.whichsection.value,10) - 1;
    if (theValue == 1)
    thesection = parseInt(f.whichsection.value,10) + 1;
    // if (thesection > maxSection)
    // thesection = maxSection;
    // if (thesection == 0)
    // thesection = 1;
    f.whichsection.value = thesection;
    alert("In the js");
    f.submit();
    //return (false);

    }

    //--></script>


    it is not updating the "whichsection" hidden field. so the question is why it isn't working and what is the proper use of "this".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •