Results 1 to 1 of 1

Thread: Creating a List Menu in JavaScript

  1. #1
    Join Date
    Sep 2010
    Posts
    38

    Creating a List Menu in JavaScript

    I HAD THE ISSUE BELOW SORTED OUT. THANK YOU.



    This may be easy for most of you, but I am stuck.

    I am retrieving a field from a database, let's call it "Q".

    The response texts is handled well. (I use the AJAX request method).

    Now what I am trying to do is insert a link in a table cell where the records in the responde text are used as parameters for a JavaScript function.


    This line does not work:

    (host cell)= "<a href='javascript:GetFlyPic('"+q+"')'>"+q+"</a>";

    The issue comes from the ' " + q + " ' that should go inside the function brackets.

    As a separate problem I have those tags appended to the first element and are passed as an argument to the function - "<html><body></body></html>"

    What is the proper syntax of the link and how can I avoid the tags appending to my argument.

    Here is the visual form:
    http://www.troutsalmonchar.com/Pages/FLY_MAIN_About.php
    (select "Steelhead" and "dry" or "wet"; then check the results)
    Last edited by bigcougar; 28 Oct 2010 at 01:19 PM.

Similar Threads

  1. Dropdown menu with css and javascript...?
    By AllanH in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 14 May 2009, 02:59 AM
  2. CSS Drop down menu in IE problem..
    By mylah in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 24 Mar 2009, 08:41 AM
  3. Creating multiple dynamic list boxes from mysql database
    By phoenix211984 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 26 Sep 2006, 07:26 PM

Posting Permissions

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