Solved

Hyperlink To different Files....

Posted on 2000-03-16
5
162 Views
Last Modified: 2010-04-09
I have a page where I have alot of hyperlinks to Excel files.  The files are all in the same location but are saved each day as different name according to the date it was created.  What I want to achive is that on my page i'll have 3 Textboxes and a submit button. The files that I want to link to looks something like this. C:\Emn01\Flash\Flash_15_03_00.xls. Now every day as I said, a new file is created the "_15_03_00" indicates the following Day,Month,Year. The textboxes on my form are also Day,Month,Year. The moment I insert data in the textboxes and click the submit button it must then link to the date according to the data I inserted in the text boxes. E.G. If I inserted 17 in the Day textbox, 04 in the Month Text Box and 99 in the Year text box and then click the Submit button I should be directed to "C:\Emn01\Flash\Flash_17_04_99.xls".
0
Comment
Question by:FV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:xabi
ID: 2623882
Try this:

..
..
<script language="javascript">
<!--
function checkit() {
 idForm = document.myform
 sTmp =  "C:\Emn01\Flash\Flash"
 sTmp += "_" + idForm.myday.value
 sTmp += "_" + idForm.mymonth.value
 sTmp += "_" + idForm.myyear.value + ".xls"
 idForm.action = sTmp
 return true
}
//-->
</script>
</head>
<html>
<form name="myform" onsubmit="return(checkit())">
 <input type="text" size="2" name="myday"><br>
 <input type="text" size="2" name="mymonth"><br>
 <input type="text" size="4" name="myyear"><br>
 <input type="submit">
</form>
..
..


xabi
0
 

Author Comment

by:FV
ID: 2624038
xabi,

I tried it. When I click the submit button nothing happens. What do you think Im doing wrong?
0
 
LVL 8

Accepted Solution

by:
xabi earned 100 total points
ID: 2624222
Try this other script, it works for me:

---------- 8< ------- 8< ----------
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="javascript">
<!--
function checkit() {
 idForm = document.myform
 sTmp =  "file:///C|/Emn01/Flash/Flash"
 sTmp += "_" + idForm.myday.value
 sTmp += "_" + idForm.mymonth.value
 sTmp += "_" + idForm.myyear.value + ".xls"
 alert("Downloading file: " + sTmp)
 idForm.action = sTmp
 return true
}
//-->
</script>
</head>
<html>
<form name="myform" action="" method ="get" onsubmit="return(checkit())">
 <input type="text" size="2" name="myday"><br>
 <input type="text" size="2" name="mymonth"><br>
 <input type="text" size="4" name="myyear"><br>
 <input type="submit">
</form>
</BODY>
</HTML>
------------- 8< --------- 8< --------

xabi
0
 
LVL 19

Expert Comment

by:daveamour
ID: 2624548
xabi - do you spend all day on here?

If I look at a basket weaving or walrus polishing question , will you have answered that too?
0
 

Author Comment

by:FV
ID: 2625090
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question