Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

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
0
tony_813
Asked:
tony_813
  • 3
  • 2
1 Solution
 
RoonaanCommented:
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-
0
 
tony_813Author Commented:

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
0
 
tony_813Author Commented:
Is there a way for it not to be sumbitted.. because i'm acually not sumbitting anything...?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
RoonaanCommented:
<form onsubmit="return false">

-r-
0
 
CaveyCoUkCommented:
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).  
0
 
tony_813Author Commented:
That did the job Roonaan...... thnx

CaveyCoUK, I am currently using IE 6

tony_813
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now