Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Object Expected

Posted on 2003-03-25
4
Medium Priority
?
298 Views
Last Modified: 2010-05-18
I have a links in my asp page that points to different crystal reports.  On the page the user can hoover over the link, and view a description of the report. When they go to hoover over the report name I am receiving the error object expected.  
The following is the link I build, and the javascript that I call:


<A target="_blank" ONMOUSEOUT="javascript:dis();return false;" ONMOUSEOVER="javascript:test(<%=n%>,'bob');return false;" Href="/ReportFinder/<%=rs337(0)%>.rpt"><%= MyArray(I)%></a>


<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function test(z,who)
{

add.value= who
add.style.width=500
add.style.top = 350 + z
add.style.left = 400

}
function dis()
{
add.value=""
add.style.height=0
add.style.width=0
}
//  End -->
</script>

<font size=2 face="arial narrow">
<input type=button name="add" style="position:absolute;background-color:yellow;color:black;border-color:black;height:0;width:0">


Any help would be grateful!!



0
Comment
Question by:codemongrol
  • 2
4 Comments
 

Author Comment

by:codemongrol
ID: 8203355
I also need to mention that each person belongs to a group that sees only certain reports.  Most pages are working, but people that belong to our Design Center Group are receiving the object expected error message on their page.  I am a part of the administration group, and the hoover links work fine for me.  I use no security other then what the end use can see according to my SQL tables.  This information is then compared to report names that are in reports directory.  All this code has been working fine until I added the javascript functions that are called from the mouse events.

Thx
Mike
0
 

Accepted Solution

by:
Asp earned 320 total points
ID: 8203415
Where is your script located? When it's inside you're body it doesn't work, because the browser THINKS no script exists. so something like this would be the solution:

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function test(z,who){
add.value= who;
add.style.width=500;
add.style.top = 350 + z;
add.style.left = 400;
}
function dis(){
add.value="";
add.style.height=0;
add.style.width=0;
}
//  End -->
</script>

<BODY>
<font size=2 face="arial narrow">
<input type=button name="add" style="position:absolute;background-color:yellow;color:black;border-color:black;height:0;width:0">

<A target="_blank" ONMOUSEOUT="javascript:dis();return false;" ONMOUSEOVER="javascript:test(<%=n%>,'bob');return false;" Href="/ReportFinder/<%=rs337(0)%>.rpt"><%= MyArray(I)%></a>

</BODY>

PS: some browser might get stuck when you don't use a ";" with javascript after (every) line. Just noticed :)
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8203420
Is this page posted somewhere so that we can play with it?

Fritz the Blank
0
 

Author Comment

by:codemongrol
ID: 8203481
DANNGGGGGGG you guys are QUICK!!!!! I posted and then in 5 minutes I had an answer.  You fixed my nightmare ASP.  I have been working on this since yesterday afternoon. Tnx so much!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

571 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