Note that there are some explanatory texts on larger screens.

plurals
  1. POOnclick command wont send ID to text box, onclick needs "escaping" to be recognized as code
    primarykey
    data
    text
    <p>Hi there I hope I made sense, I'm working on an assignment, but I can.t remember how to sort of escape a line of code, so the code I need is seen as code? If that makes sense.</p> <p>I have this section: </p> <pre><code>&lt;input type="text" name="firstSeat" id="firstSeat" readonly="readonly" style="border: solid; background-color: #374B5C; color: #fff; width:30px;"/&gt; </code></pre> <p>So that box has the ID firstSeat, and I want to populate it with an ID like A01, using this code;</p> <p><strong>EDIT</strong> I'm having trouble pasting my code in here, some of it doesn't show up, so I hope these are OK.</p> <p>Code is here too <strong>https://gist.github.com/7f54751e1563e778d482</strong></p> <p>So you can see on line 10 and 13, there is this code:</p> <pre><code>&lt;%Do While Not thrus.EOF dim seatID seatID=thrus("sea_ID") bookedcheck="SELECT * FROM booking WHERE boo_PerID = " &amp; request("per_ID") &amp;" AND booking.boo_seaID = "&amp; seatID&amp;"" booked.Open bookedcheck, conx, adOpenkeyset, AdLockOptimistic if (thrus("sea_Reference") = "B01") OR (thrus("sea_Reference") = "C01") OR (thrus("sea_Reference") = "D01") OR (thrus("sea_Reference") = "E01")OR (thrus("sea_Reference") = "F01")OR (thrus("sea_Reference") = "G01")Then Response.write "&lt;br /&gt;" end if if not booked.EOF then response.write("&lt;href='#"&amp;thrus("sea_Reference")&amp;"'&gt;&lt;img src='images/booked.gif' border='0' title='"&amp;thrus("sea_Reference")&amp;", SEAT BOOKED' onclick='document.getElementById('firstSeat').value='"&amp;thrus("sea_Reference")&amp;"';' /&gt;&lt;/&gt;") else response.write("&lt;a href='#"&amp;thrus("sea_Reference")&amp;"'&gt;&lt;img src='images/"&amp;thrus("sea_ICON")&amp;"' border='0' title='"&amp;thrus("sea_Reference")&amp;", &amp;pound;120, 45 degree left seating icon facing stage' onclick='document.getElementById('firstSeat').value='"&amp;thrus("sea_Reference")&amp;"';' /&gt;&lt;/a&gt;") end if%&gt; </code></pre> <p>So whats supposed to happen is onclick it pushes sea_reference, to firstSeat and passes it to that box up there. But when I click it it doesn't send it.</p> <p>I believe its because of this : <a href="http://i.imgur.com/thzBK.png" rel="nofollow">http://i.imgur.com/thzBK.png</a></p> <p>The onclick is seen as the same information as most of the code on that line.</p> <p>I think I need to "escape" so that the onclick command is seen.</p> <p>If anyone can help, or indeed help me to get my code in here! that would be great, thanks.</p> <p><strong>Update</strong> If it helps to see the page; <a href="http://heweb.grimsby.ac.uk/STUDENT/s0191958/PART2/booking.asp?the_ID=1&amp;per_ID=1" rel="nofollow">http://heweb.grimsby.ac.uk/STUDENT/s0191958/PART2/booking.asp?the_ID=1&amp;per_ID=1</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload