I've been trying different things and forgot to take the style='display:none' out of the div tag. But that makes no difference as far as the error. I need to be able to hide/unhide depending on the value of a drop down that is in the form. I was just trying to tackle first things first - so far...
I am creating a review screen for a form. The code writes to a new window, and I want to unhide certain div sections based on a dropdown selection. I'm having trouble getting the code to work because the <div> tags are in the code being writen to the new window. Here's my (sample) code...
Ya, I really do need to learn ASP (and someday I sure hope to have the time!), but the script you see called in the code was written by someone no longer here. Does that mean it can't be done with JavaScript?
...one more thing - the "disableRoles" function on my post causes it to pass only the values from the drop-down that was selected, so you wouldn't want to use that for your code.
I just posted a new thread with a subject of "Passing data on multi-page form in same window". Check the code in my "Page1.htm" on that post - I think it does what you are looking for.
I have a three page form, and I want each page to open in the same window, but when I use "location.href" it won't pass the data entered in page 1 to page 2, or page 1 & 2 to page 3. Anyone know how to make BOTH of these things (passing data AND opening in the same window) work at the same time...
Hmmm, I don't get the warning with that, but I also don't get the data from Page1.htm. And I do get an "Access is denied" error on line 6 (nwwin = window.open(url);).
I have a multi-page form that is working, but I want it to open Page2.htm in the same window. Here's my code:
Page1.htm:
<html>
<head>
<title>New User Request</title>
<script language="JavaScript">
function opwin(url) {
nwwin = window.open(url);
}
var prevRole = "";
function...
found my mistake and ended up with:
function gtvals() {
d = document.NewUser2;
o = opener.document.NewUser;
d.ufname.value = o.ufname.value;
d.ulname.value = o.ulname.value;
d.Department.value = o.Department.value;
d.Role.value = o.Role.value;
var whichRoleSelect =...
I changed the IDs and "Subject Line" as suggested.
I also tried the code and got the same results as before. I changed the code to:
var whichRoleSelect = opener.document.NewUser.getElementById(o.Department.options[o.Department.selectedIndex].value)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.