Go Back   Access World Forums > Apps and Windows > Web Design and Development

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-11-2015, 04:28 AM   #1
Freshman
Newly Registered User
 
Freshman's Avatar
 
Join Date: May 2010
Location: South Africa
Posts: 343
Thanks: 20
Thanked 7 Times in 7 Posts
Freshman is on a distinguished road
Link button with variable

Hi all,

I need some help with the syntax of the following please:
I want a 'Submit' button to jump to a URL which is madeup with the info of text input field.

I have this so far:

Code:
<FORM>
  Staff Number: <input type="text" name="staffnum"><br>
</FORM> 

<FORM METHOD="LINK" ACTION="www.mysite.com"/staffnum".pdf">
<INPUT TYPE="submit" VALUE="Submit">
</FORM>
I'm very new to HTML so the code might need cleaning up to be combined

I need the submit button to link to a stored document eg:
www.mysite.com/123.pdf

If '123' was entered in the input field

Can someone assist please?
Thanks

__________________
Windows 7
MS Access 2007

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Freshman is offline   Reply With Quote
Old 06-11-2015, 05:13 AM   #2
Freshman
Newly Registered User
 
Freshman's Avatar
 
Join Date: May 2010
Location: South Africa
Posts: 343
Thanks: 20
Thanked 7 Times in 7 Posts
Freshman is on a distinguished road
Re: Link button with variable

Got it after lots of tries and searches

Quote:
<script type='text/javascript'>
function doit()
{var x = document.getElementById('symtb').value
window.open('http://www.mysite.com/'+x+'.pdf')}
</script>
<input type='text' id='symtb' value='' size='10'>
<br>
<button onclick='doit()'>Submit</button>
__________________
Windows 7
MS Access 2007

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Freshman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to Create and Open Variable Folders with a Link Created in an Access Query theimel Modules & VBA 3 08-06-2014 11:01 PM
[SOLVED] Link Button johnob Modules & VBA 0 05-20-2014 09:18 AM
Cmd Button/Link Doc Help smbarney Forms 4 11-16-2010 06:16 AM
Button to Link one form to another manny_cb Forms 6 08-05-2008 11:58 AM
Link variable length report fields with a line jj18 Reports 1 03-04-2001 12:38 PM




All times are GMT -8. The time now is 06:59 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World