We're in the process of re-writing the Intranet at work, and my javascript
knowledge could be written on the back of a post card. ;-)
Can any of you point me in the direction of some code that would enable a
form to open a specific pdf file? Details are below.
--------------------
All of our purchase orders are saved back to pdf files. Each pdf has the
prefix "PO_" followed by the po reference, then the file extension ".pdf".
For example, our file would be called "PO_12345M.pdf".
Each set of files is archived into years (folders are called 2003, 2004,
2005 etc.) so it will probably need a drop down box to select year, unless
it can search through all the folders.
The visitor should only need to enter the PO reference, and the code puts
the "PO_" and the ".pdf" on the end of it, and hey presto Acrobat opens with
the PO, or you get an error dialog if the file cannot be found.
--------------------
I'm working on a JSP based project. On myJsp1.jsp, I open a new window using window.open and store reference in a variable myWin like:
From here i submit the form to myJsp2.jsp. In this file, I want the reference myWin to close the opened window. What I'm doing while submitting form is:
I've read that this way JavaScript references can be passed in url.
Now when I do getParameter in myJsp2.jsp as
I get JavaScript error that this winRef do not support the close() property.
For an in-house web application (it will only be deployed on Firefox browsers with JavaScript turned on), I need to open a preview window (which needs to be a separate window, even if Firefox is set to open targeted links in new tabs) and be able to change the preview window's location.href from the opening window, even after a new page is loaded into that window.
I keep getting a runtime error stating that this document.adddealer.dealertoadd.value = dealer; is null or not an object. I've rewritten the Function everyway I could think of, and couldn't find any thread examples of my problem.
Here is my Function;
<Script language="JavaScript"> <!--//hide function AddDealer(dealer) { document.adddealer.dealertoadd.value = dealer; document.adddealer.submit();
} //--> </script>
This calls the Function;
<input type="button" value="Make This My Dealer" name="button">
When the code breaks and I bring up Microsoft Debugger it shows a value in the parameter.
I'm wanting to create a pop-up window that shows upon entering on the website with two buttons that have different functions.
I'm wanting the first button, when clicked, stops the message from appearing again. -Similar to the "do not show again" option that uses cookies from this thread.. [URL] the second button, when clicked, redirects the user to a URL
Is it as simple as using the code from the thread above and some simple javascript buttons?
function testfield() { var un = document.getElementById("dir").value; if (!/^(/ftp/nas)/i.test(un)) { alert ("Invalid starting characters - must be /ftp/nas"); return false; [Code]...
I have a code like above which doesn't allow the user to proceed with out starting the field with a "/ftp/nas" which should be the starting of a path. Is there any way to make it disabled and the user only can enter the rest of the path. for eg: user1 has directory path like /ftp/nas/user1/help
so when this user enters his path, on the field "/ftp/nas" should always be available and the user has to only enter the rest of the path. and the user is allowed to enter only / (// is not allowed) and [A-Za-z] in the field. this is just to secure the application from typing mistakes.
I am just wondering if someone can tell me what this message means, even roughly. The following is the error message box that pops up when I try to access/open a yahoo email account. The error (in english) is followed with some script referred to. I am very "curious" what this is. ANY suggestions welcome.
I'm interested in learning how to do this. What I'm doing is I'm making a social networking site linked to a game called Habbo, and for the registration page, once they put in their Habbo Username, I want to be able to load the image next to it. [URL]...
That is the link to the image. So basically, once they enter a value into the textbox, I want to be able to use that value to replace the [TEXTBOX.DATA] part from the above link and use that as an image.
I need to check form field contains existing data(want to check database) are not. if that field contain existing data it wants give alert.., In database i set projectcode as Unique.if 1st user giving projectcode as 1 it wants to store. if 2nd user giving the same projectcode it want's to throw alert msg.., But i need to learn step by Step. So i created Form with one Field(ProjectCode).In database i set ProjectCode as unique.
Basically, the script is an onMouseover slideshow which works fine. The problem is that in internet explorer, it says there is a syntax error relating to the javascript code. (this doesn't appear on chrome or firefox) here is the code:
Code: <script> <script language="JavaScript1.1"> var myimages=new Array() var gotolink="#" </script>
basically, by putting the script language here, IE8 is saying there is a syntax error! removing it stops the error but stops the script from working. What can I do here? If I put it in an external .js file instead (right now it is in the head of the HTML page) will this solve the problem?
I downloaded a calendar script that allows a user to just click on the date and have it populate the form input field- the problem is it lets you enter dates previous to today. I would like it so it could not enter any dates less than today.
Problem is, I know nothing about javascript. I am less than a noobie.
Would some kind soul have a look and see if it would be possible to do and show me what to do.
The code is below. There is also a css file which I did not include.
Code: function positionInfo(object) { var p_elm = object; this.getElementLeft = getElementLeft; function getElementLeft() {
I had a requirement in javascript.If I enter time as 12 it should automatically insert colon after hours and shoud allow user to enter minutes. First enter hours 12 while we are ready to insert minutes it should automatically insert colon as well as minutes.
function autoTabTimes(input, len) { if (input.value.length == 2) { if (input.value.indexOf(":") == -1) { input.value = input.value + ":"; } var str = input.value.split(":"); if (str[0].length == 1) { input.value = "0" + str[0]; }} if (input.value.length >= len) { input.value = input.value.slice(0, len); input.form[(getIndex(input) + 1)].focus(); } return true; }
The above code is working but it is not allowing user to edit the time back space is not working.
javascript coding portin of the web page.Need it to use the pop up alerts that have been input above and also to calculate the order upon entering a correct amount showing subtotal, tax, and total.
Ive got codes that calculate the route & prices between distances upon entering data into two boxes lablled "to" and "from" using google maps. What I need is the route to be shown on the map. Ive tried the googlemap forums but they wont help me (they just direct me to the documentation which I dont really understand).
Anyway after trying to read and understand the code, I managed to get the map to display but when using the form to find postcodes, it stops working.
I need three tabs out of which only one is open at a time n when u open another tab, one out of the earlier closed one should open(preferably with mootools). And also the tab which is opened should come at the top of the page as well.
I have a text area, I want that user's should not be able to enter a charaters in it. I want them to enter only numbers.I have written the code below to do this but it is not working as I think I am not calling the function right way.I am open to new suggestions as well, if I can show some alert to user if they enter character rather than no.
Through window.open or window.showmodaldialog, I want to open a word or excel document in Print Preview mode. Bcos I don't want the user to make any changes or save it but the user can ONLY VIEW OR take a print out.
I'm using an <A> tag with an onclick event to open a window with JS (window.open)... In FIREFOX, if I click very quickly, multiple windows open. Not a problem in IE.
This code does not working in Mozilla. Works fine in IE. -------------- <input type=text value=100 name=textbox> <script> alert(textbox); </script> -------------- This perhaps, because of Microsoft policy to globalize all tag names. Is there any method for cross-browser fix without using getelementbyid? Is there any method to pass values from outside of <script>, inside? (something like "global" in php functions) Javascript must be kept inside <script> tag.
i'm wondering how i can get a reference to the next td in a row? Do i need to assign all td's an id or something? i could do that failry easily because the table gets generated dynamically via a php function.. i just hink this would be nice that way when i go to delete something (with those infamous checkboxes) i would like the javascript prompt to display what it is that will be deleted..