What is wrong with this statement? (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


mrjoe -> What is wrong with this statement? (9/26/2001 20:48:00)

Hi,

Can anyone help please?

I am trying to use the following:

tempID="<a "http://record_edit.asp?ID="
tempID=tempID & rstemp("UniqueID") & ""
tempID=tempID & "</a>"

To build this statement below using response.write where rstemp is a record source:

<a href="http://record_edit.asp?ID=7"></a>

But I am gettting confused with all the quotes.

Thanks,
Joe C.





ginnie -> RE: What is wrong with this statement? (9/26/2001 23:24:00)

Try this:

tempID="<a href='http://record_edit.asp?ID="
tempID=tempID & rstemp("UniqueID") & "'>"
tempID=tempID & rstemp("UniqueID") & "</a>"

That should ultimately come out to:

<a href='http://record_edit.asp?ID=7'>7</a>

Of course maybe you'd rather use something other than the UniqueID to display as the link ... like maybe rstemp("ProductName") or the like.

Are we having fun yet?

[This message has been edited by ginnie (edited 09-26-2001).]





Mojo -> RE: What is wrong with this statement? (9/26/2001 23:26:00)

In your first line you left out the href part:
tempID="<a "http://record_edit.asp?ID="

Besides that, it may be better to do it like this:

tempID = "<a href=http://record_edit.asp?ID=" &rstemp("UniqueID") &">YOUR LINK</a>"

Then you could print tempID anywhere on your page.

Joe

Whoops! ginnie you got me typing!

[This message has been edited by jbennett (edited 09-26-2001).]





ginnie -> RE: What is wrong with this statement? (9/26/2001 23:38:00)

Hey Joe,

It probably pays to type slower . . . then we wouldn't have to go back and edit our messages.

ginnie





mrjoe -> RE: What is wrong with this statement? (9/26/2001 23:47:00)

Thank you so much,

It is clear now where I was going wrong and I like your way so much better.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625