473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Enter to make URL

I am having a problem setting a page up so that when the user hits enter that it will run my script just as if they clicked submit. I am a dumby and have tried so many combos I am losing my mind...please help.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2.  
  3. function makeURL() {
  4. var baseURL = 'http://www.encompassaccountingservices.com/Accounting Client Files/';
  5. var nombre = document.form1.nombre.value; 
  6. var ext  = '/Financials.pdf';
  7. var url = baseURL + nombre + ext;
  8. location = url;
  9. }
  10.  
  11. </script>
  12.  
Expand|Select|Wrap|Line Numbers
  1. <form name="form1" id="form1"  method="post" action=""  >
  2.     <p style="width: 361px">
  3. Company Name  <input name="nombre" type="text" id="nombre" value="" style="width: 184px"><br> 
  4.  
  5.      <p style="width: 365px; height: 44px;">
  6.      <input name="button" type="button" id="button" value="Click here to get Financials" onclick="makeURL()"  style="width: 185px" >
  7. </form>
Jan 20 '09 #1
3 1339
Dormilich
8,658 Expert Mod 8TB
probably window.location.href is what you're looking for.
Jan 20 '09 #2
Anyone else......I need to make this work?
Jan 22 '09 #3
acoder
16,027 Expert Mod 8TB
Check the key code onkeypress. Enter is 13.
Jan 22 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ali Eghtebas | last post by:
Hi, I have 3 questions regarding the code below: 1) Why can't I trap the KEYDOWN while I can trap KEYUP? 2) Is it correct that I use Return True within the IF-Statement? (I've already read...
5
by: Alan Zhong | last post by:
i am trying to similate an "ENTER" as a key to switch focus in a sequence of text inputs. i don't want to use "event.keyCode" since i want to do additional testing before i decide which text input...
0
by: VMI | last post by:
If I'm in a multi-line textbox and I'm writing a postal address (ie. write ist line and press <Enter>, write 2nd line and press <Enter>, etc...) how can I make sure that the Enter key will always...
11
by: Sandra Castellanos | last post by:
Hello, I want to know what I have to do to make the enter key to submit forms. I read in another newsgroup that inserting an html hidden text box made the trick, and it actually does, but in my...
5
by: Eric | last post by:
Hi All, I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
6
by: Clark Sann | last post by:
Can someone help me understand what object should be used as the lock object? I've seen some programs that use Monitor.Enter(Me). Then, in those same programs, they sometimes use another object. ...
2
by: pemigh | last post by:
Client's fingers have been well trained on another application to wrap lines by hitting shift-enter, and wants the same in Access application. Changing "enter key behavior" for controls is not...
10
by: john | last post by:
In a form I'm trying to make a search field to be able to quickly find a record on ID-number. User enters a number and presses enter to move to that record. How do I trap for the enter-keystroke...
18
by: Zytan | last post by:
I want the same function to be run whether you press Enter or double click the listbox. It seems really verbose to write both handlers to both events everytime, even if they both call the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.