Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button actions to do the same for text

Status
Not open for further replies.

bjm027

MIS
Mar 7, 2003
59
US
I have a button in which it updates the members profile. This works fine and will take you to the page in which the user can update his/her information.
-------------
Response.Write &quot;<form action=&quot;&quot;UpdateMe.asp&quot;&quot; method=&quot;&quot;Post&quot;&quot;><input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;ID&quot;&quot; value=&quot;&quot;&quot; & strUserName & &quot;&quot;&quot;>&quot;

Response.Write &quot;<div align = &quot;&quot;right&quot;&quot;><input type=&quot;&quot;submit&quot;&quot; name=&quot;&quot;Submit&quot;&quot; value=&quot;&quot;Change Info&quot;&quot;></div>&quot;
--------------
Well I want to perform the same action with just text. And this is what I have tried and of course it doenst work. How would I go about doing this.
--------------
Response.Write &quot;<img src=&quot;&quot;images/RightArrow.gif&quot;&quot; width=&quot;&quot;12&quot;&quot; height=&quot;&quot;12&quot;&quot;> Click <a href=&quot;&quot;UpdateMe.asp&quot;&quot; class = &quot;&quot;regular&quot;&quot;><input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;ID&quot;&quot; value=&quot;&quot;&quot; & strUserName & &quot;&quot;&quot;>HERE</a> to update your member profile.&quot;
--------------

Any suggestions?

Thanks in advance....
 
Maybe it wasnt the right question...?

But for now I just put the submit button in place of where I was going to add the text. This will work. If anyone does know how to do the same results with text that would be cool too.

Thanks in advance...
 
you need to submit the form from the href. that is the only issue I see with what you are trying to do

Response.Write &quot;<img src=&quot;&quot;images/RightArrow.gif&quot;&quot; width=&quot;&quot;12&quot;&quot; height=&quot;&quot;12&quot;&quot;> Click <a href=&quot;&quot;#&quot;&quot; class = &quot;&quot;regular&quot;&quot; onClick=&quot;&quot;document.forms[0].submit()&quot;&quot;><input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;ID&quot;&quot; value=&quot;&quot;&quot; & strUserName & &quot;&quot;&quot;>HERE</a> to update your member profile.&quot;


____________________________________________________
$str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
$Nstr = ereg_replace(&quot;sleep&quot;,&quot;coffee&quot;,$str); echo $Nstr;

onpnt2.gif
 
you'll need to play with that syntax. it looks alright though. you may need to use a Chr() code in place of the ( ) and the forms[0]

____________________________________________________
$str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
$Nstr = ereg_replace(&quot;sleep&quot;,&quot;coffee&quot;,$str); echo $Nstr;

onpnt2.gif
 
Thanks for the reply.

I will have to try this tomorrow. I am already late for the gym. Ill keep you posted.

Thanks in advance...
 
This what I have tried.
-------
Response.Write &quot;<img src=&quot;&quot;images/RightArrow.gif&quot;&quot; width=&quot;&quot;12&quot;&quot; height=&quot;&quot;12&quot;&quot;> Click <a href=&quot;&quot;UpdateMe.asp&quot;&quot; class = &quot;&quot;regular&quot;&quot; onClick=&quot;&quot;document.forms[0].submit()&quot;&quot;><input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;ID&quot;&quot; value=&quot;&quot;&quot; & strUserName & &quot;&quot;&quot;>HERE</a> to update your member profile.&quot;
-------
I guess I am not following what you stated in you last post about using a Chr() in place of the ().

The page for the update.asp appears and is blank, and not with the form to update the information.
???
 
how about
response.Write &quot;<img src=&quot;&quot;images/RightArrow.gif&quot;&quot; width=&quot;&quot;12&quot;&quot; height=&quot;&quot;12&quot;&quot;>&quot;
response.Write &quot;Click <a href=&quot;&quot;UpdateMe.asp&quot;&quot; class = &quot;&quot;regular&quot;&quot; onClick=&quot;&quot;document.forms[0].submit()&quot;&quot;>&quot;
response.Write &quot;<input type=&quot;&quot;hidden&quot;&quot; name=&quot;&quot;ID&quot;&quot; value=&quot;&quot; & strUserName & &quot;&quot;>HERE</a>&quot;
response.Write &quot;to update your member profile.&quot;

____________________________________________________
$str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
$Nstr = ereg_replace(&quot;sleep&quot;,&quot;coffee&quot;,$str); echo $Nstr;

onpnt2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top