Link to home
Start Free TrialLog in
Avatar of tony_813
tony_813Flag for United States of America

asked on

input type="text"

Hello Everyone,
    I'm new to this HTML thing to bare with me...
    I have a textbox that I have created..
    on the left side i have an iframe
    When i type something in the textbox and press enter..
    the page in the iframe resets..

   Is there a way for that event to stop?

tony_813

thnx in advance
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Please post some of your html,

I think you have something like

<form target="myIframeName" .... >

  <input type="text" .... />

</form>

On pressing return/enter in the textbox, you form gets submitted. Depending on your form your whole window, or just the iframe will be refreshed.

-r-
Avatar of tony_813

ASKER


iframe:

<iframe id="objTime" style="HEIGHT: 95%; LEFT: 17%; OVERFLOW: auto; POSITION: absolute; TOP: 5%; WIDTH: 85%" height="400" width="1000" scrolling = "Yes" src="http://www.msn.com" frameborder="1"></iframe>

form:

  <form id="form1"><table>
        <tr><td>&nbsp;</td></tr>
        <tr><td><input type="button" id="cmdEnter" value="    Phone Book    " onclick="cmdEnter_onclick()" /></td></tr>
        <tr><td><input type="text" id="txtEntry" style="text-align:center; background-color:Olive"/></td></tr>
        <tr><td>&nbsp;</td></tr>
        <tr><td style="FONT-SIZE: 12px">&nbsp;<input name="radSelect" style="width: 16px" type="radio" value="Schedule" onclick="cmdTimeSheet_onclick()"/>Schedule &nbsp;
                                              <input name="radSelect" style="width: 16px" type="radio" value="Links" onclick="cmdTimeSheet_onclick()"/>Work Links</td></tr></table></form>

tony_813
Is there a way for it not to be sumbitted.. because i'm acually not sumbitting anything...?
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CaveyCoUk
CaveyCoUk

Or if it is not a form to be submitted in any way, just dont put in the <form> tags.  It is possible to have input fields which are not associated with a form, just be careful you are not refering to the items as elements in the form and are refering to them by ID in your scripts.

Hope that helps.

Otherwise, this is an odd/intriguing 'feature'.  What browser are you using? ('Cause I really dont think that is 'normal' behavior).  
That did the job Roonaan...... thnx

CaveyCoUK, I am currently using IE 6

tony_813