Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I'm looking for a Tell-A-Friend trick


jhande

Recommended Posts

tellfriendku5.gif

 

Working example - Here

 

I'm looking for some way so that when someone clicks in to the form box to type a friends email address, the message disappears instead having to highlight and delete it.

 

Any ideas what I should be searching for or what it's called?

 

:huh:

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

I found some javascript code that I can play around with to see if it makes the text disappear onClick (not sure).

 

But now I have no clue how to add it to the PHP file. :blush:

 

I would think it would have to go in the tell_a_friend.php file since that is where the displayed text for the box is.

Line 25:

'text' => tep_draw_input_field('to_email_address', 'Enter E-Mail Address', 'size="21"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);

 

Any thoughts or ideas would be appreciated!

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Sorry everyone... 2:23 am, got the flu, took a test today at college and bombed, did some homework that's due tomorrow, but I'd rather be dead is how this flu is kicking me. :x So please bear with me before I try to get some sleep again. -_-

 

Here's the code I found, yes I thought too late that it might be helpful to see.

 

<script language=JavaScript>

<!--

function clear_textbox()

{

if (document.text_form.u_input.value == " Enter E-Mail Address ")

document.text_form.u_input.value = "";

}

-->

</script>

 

 

<form name="text_form" action="http://www.codeave.com/html/post.asp" method=post>

<input name=u_input onFocus=clear_textbox() value=" Enter E-Mail Address ">

<input type=submit value=Submit>

<input type=reset>

</form>

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...