Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Thanked 0 Times in 0 Posts

    Question Help with syntax

    Hello All,

    I am having problems getting the sytax correct in the code below.

    while (!rs.eof) {
             html += '<tr>';
             html += '<td id="RunDate" name="RunDate">' + rs.fields(0) + '</td>';
             html += '<td id="HP" name="HP">' + rs.fields(1) + '</td>';
             if (rs.fields(2) == 'None Found') {
                   html += '<td>' + rs.fields(2) + '</td>';
             } else {
              html += '<td><a href="UpdateOkToPay.html?ClaimID="'" + strClaimID + "' + ">' +  rs.fields(2) + '</a></td>';
               html += '<td id="Status" name="Status">' + rs.fields(3) + '</td>';
               html += '<td id="AnalystName" name="AnalystName">' + rs.fields(4) 
               html += '<td id="AnalystDate" name="AnalystDate">' + rs.fields(5) + '</td>';
               html += '<td>' + rs.fields(6) + '</td>';
               html += '<td>' + rs.fields(7) + '</td>';
               html += '<td>' + rs.fields(8) + '</td>';
               html += '<td>' + rs.fields(9) + '</td>';
               html += '</tr>';

    I am trying to pass a variable in a href that displays a claim id. I can't seem to get the sytax correct so the id is passed in the url to next page.

    I would really like to pass more than one variable to the next page if that is possible.

    Any and all help is greatly appreciated.


  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,699 Times in 2,675 Posts
    To pass a value to another page you need to use a cookie (or local storage in modern browsers), or use a query string. Google for more information.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  3. #3
    Senior Coder
    Join Date
    Sep 2010
    Thanked 275 Times in 275 Posts
    When a variable is passed it is usually without quotes.

    html += '<td><a href="UpdateOkToPay.html?ClaimID="'" + strClaimID + "' + ">' +  rs.fields(2) + '</a></td>';
    instead try.
    html += '<td><a href="UpdateOkToPay.html?ClaimID=' + strClaimID + '">' +  rs.fields(2) + '</a></td>';
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.

    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.


Posting Permissions

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