Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question help adding query line to address bar (now a simple problem)

    error about no variable after '.'

    the problematic code in action at:
    http://webpages.charter.net/schoppe1/schedule.html

    the error is where its supposed to have a last page and next page surrounded by a number span showing what numbers this page displays
    (i.e. last 21-40 next , where last and next are links)

    lots of errors found and fixed, and my code's prob is down to this:

    Code:
    <FORM NAME="page" METHOD="LINK" ACTION="schedule.html">
    <INPUT TYPE="hidden" NAME = "var" >
    </FORM>
    
    <script language="JavaScript" type="text/javascript"><!--
       if(firstnum == firstDate/4)
       {
         document.write("&nbsp;&nbsp;&nbsp;&nbsp;")
       }
       else
       {
         document.write('<a href="javascript:document.page.var.value = firstnum - 20;document.page.submit();">last</a>')
       }
       document.write( "&nbsp;&nbsp;") 
            
       document.write((firstnum +1-firstDate/4) + "-")
       document.write(lastnum-firstDate/4)
    
       document.write("&nbsp;&nbsp; ")
       if(numleft>=20)
       {
         document.write('<a href="javascript:document.page.var.value = lastnum;document.page.submit();">next</a>');
       }
       else
       {
         document.write("&nbsp;&nbsp;&nbsp;&nbsp;")
       }
    //--></script>
    wow i still can't believe i wrote this mess... sorry, but i only started learning javascript yesterday

    anyway, can you help me figure out why

    document.write('<a href="javascript:document.page.var.value = lastnum;document.page.submit();">next</a>');

    gives me an error about no identifier after '.' and why

    javascript:document.page.var.value = lastnum;

    doesn't seem to set the value of var when i type it in ie's address bar... it should, shouldn't it?
    Last edited by singedpiper; 01-04-2005 at 11:08 PM. Reason: one error left

  • #2
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation

    plz remove this reply
    Last edited by singedpiper; 01-04-2005 at 11:09 PM.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation

    reply no longer pertinant
    Last edited by singedpiper; 01-04-2005 at 11:09 PM.

  • #4
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts
    thanks for all the help, i ended up scrapping the form and just making a document .write('<a href = "schedule.html?first_entry=' + (firstnum+20) + '">next</a>');


  •  

    Posting Permissions

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