Adding a function call to <a href= page.asp..

Results 1 to 2 of 2

Thread: Adding a function call to <a href= page.asp..

  1. #1
    william Guest

    Default Adding a function call to <a href= page.asp..

    I&#039m calling a serverside Javascript Random function, "Rnd()" with each asp page I link to. I have done this successfully in the following code:<BR><BR> response.write(&#039&#060;a style="color:#000000" href="&#039 + &#039page1.asp?clientno=&#039+newclients("clientno ")+&#039&folderno=&#039+lnFolderNo+&#039?rnd=&#039 +Rnd()+&#039&tabno=6"&#062;&#039);<BR><BR>However, in the following code, the href is outside of the Response.Write statement as follows:<BR><BR> &#060;a href="comments.asp?rnd="+Rnd()&#062;&#060;%Respons e.Write(GetLString(102));&#039comments&#039%&#062; &#060;/a&#062;<BR><BR><BR>I need to move the href statement inside the &#060;% %&#062; to execute serverside but am having problems with syntax. <BR><BR>Any help would be appreciated.<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    463

    Default RE: Adding a function call to <a href= page.a

    You can just put the &#060;a href&#062; tag inside quotes inside response.write. The thing to remember is to use double double quotes anywhere you would normally use a single double quote in the &#060;a href&#062; tag. For instance<BR>&#060;%<BR>Response.write "&#060;a href=""MyPage.asp""&#062;My Page&#060;/a&#062;"<BR>%&#062;<BR>or<BR>&#060;%="&#060;a href=""mypage.asp""&#062;my page&#060;/a&#062;" %&#062;

Posting Permissions

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