Passing a variable

Results 1 to 4 of 4

Thread: Passing a variable

  1. #1
    JustinS Guest

    Default Passing a variable

    Hiya all,<BR><BR>What I want to do is essentially pass the value of a variable back to a page which doesn&#039t use a form action. Up until now i&#039ve been using forms and hidden inputs but this really isn&#039t appropriate for the page as no form as such gets submitted. <BR><BR>All that happens when a link is clicked is that a value is incremented (a month) but when this happens and the new month is displayed the value of the variable is lost.<BR><BR>Thanks in advance for any & all help,<BR><BR>Cheers,<BR><BR>Justin

  2. #2
    John P Guest

    Default RE: Passing a variable

    I assume you have a previous and next button or similar.<BR><BR>this form could receive a value eg:<BR><BR>DIM ctr<BR>ctr = Request("CTR")<BR><BR><BR>then code the next buttons HREF as eg "XXX.ASP?ctr=&#060;% =str(ctr+1)%&#062;" <BR><BR>and the previous as "XXX.ASP?ctr=&#060;% =str(ctr-1)%&#062;"<BR><BR>the request code above will read the value passed.<BR>

  3. #3
    JustinS Guest

    Default RE: Passing a variable

    Hiyas,<BR><BR>Thanks for the help John.<BR><BR>I already have a value assigned to the href tag - here is the actual line of code I am using to increment the month:<BR><BR>&#060;a href="calendar_view_team.asp?date=&#060;%=AddOneMo nth(dDate)%&#062;"<BR><BR>After reading your reply I tried changing this to:<BR><BR>&#060;a href="calendar_view_team.asp?team=&#060;%=team%&#0 62;?date=&#060;%=AddOneMonth(dDate)%&#062;"<BR><BR >Unfortunately this didn&#039t work - it seemed to add the contents of the current date (from the variable dDate) to the value of team eg: team=Shift1?date=10/02/00?date=10/02/00 - each time I tried to advance a month another "?date=10/02/00" would be added and the month did not advance at all.<BR><BR>I&#039m still changing the code, putting things in different order etc - any ideas?<BR><BR>Cheers,<BR><BR>Justin

  4. #4
    JustinS Guest

    Default RE: Passing a variable - Working ok!

    D&#039oh .. was using another ? instead of a & - working fine now =)<BR><BR>Cheers,<BR><BR>Justin

Posting Permissions

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