473,395 Members | 1,637 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,395 software developers and data experts.

Permission denied error ASP.Net Vsual studio

I am working with a piece of javascript that i have inherited from
another developer. It is for a date picker function and it runs fine
locally but i get an error when i deploy it on the server and run it.
Can anyone help me with my issue i get a permission denied error also
when the error begins.
i get the error on the folowing part of the codee:

window.opener.Form1.txtDate.value = '05/10/2004'

The complete line of code is

<script language="javascript">window.opener.Form1.txtDate. value =
'05/10/2004';window.close();
Jul 23 '05 #1
3 3518
Colin Graham wrote:
I am working with a piece of javascript that i have inherited from
another developer. It is for a date picker function and it runs fine
locally but i get an error when i deploy it on the server and run it.
Can anyone help me with my issue i get a permission denied error also
when the error begins.
i get the error on the folowing part of the codee:

window.opener.Form1.txtDate.value = '05/10/2004'

The complete line of code is

<script language="javascript">window.opener.Form1.txtDate. value =
'05/10/2004';window.close();


You can't set the value of a form element in another window. The solution
to this is to create a function in the opener that does the setting, then
invoke that from the opened window:

-- in the opener --

<script type="text/javascript">
function setFormValue(formName, elementName, value) {
document.forms[formName].elements[elementName].value = value;
}
</script>

-- in the opened window --
<script type="text/javascript">
opener.setFormValue('Form1', 'txtDate', '05/10/2004');
window.close();
</script>

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
Grant Wagner <gw*****@agricoreunited.com> wrote in message

You can't set the value of a form element in another window. The solution
to this is to create a function in the opener that does the setting, then
invoke that from the opened window:

-- in the opener --

<script type="text/javascript">
function setFormValue(formName, elementName, value) {
document.forms[formName].elements[elementName].value = value;
}
</script>

-- in the opened window --
<script type="text/javascript">
opener.setFormValue('Form1', 'txtDate', '05/10/2004');
window.close();
</script>


Forgive the ignorant question, but in this last script, I see you use
opener as some kind of global. Is it built into the DOM? One can use
it in a script and assume it always exists?
Jul 23 '05 #3
> -- in the opened window --
<script type="text/javascript">
opener.setFormValue('Form1', 'txtDate', '05/10/2004');
window.close();
</script>


in the code above i need to change the '05/10/2004' part to a value of
a variable pulled in from the calendar form. how can i do this as the
value is pulled in in the folowing code in a sub.

Private Sub Calendar1_SelectionChanged(sender As Object, e As
System.EventArgs)
Dim strjscript as string '= "<script language=""javascript"">"
strjscript = strjscript & "window.opener." &
Httpcontext.Current.Request.Querystring("formname" ) & ".value = '" &
Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</script" & ">" 'Don't Ask, Tool
Bug
Literal1.text = strjscript
End Sub


C
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: msnews.microsoft.com | last post by:
I'm running a intranet site on a NT 4.0 IIS 4 server. I have a page that uses CDONTS. I recently change this intranet application to run as an isolated process (Selecting the checkbox "Run in...
6
by: Jon Montana | last post by:
CDONTS was working well until I installed Exchange 2000. I thought it might be a relay problem, but I allowed the server IP address to relay. Thanks for anything you can offer. here's the...
3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
2
by: PM Creyghton | last post by:
I got this error without using frames: First of all, I'm developing an ASP application, and once in a while my activeX components crash or hang, I got page-not-found errors, errors generated by...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
10
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.