?
Solved

Object Expected

Posted on 2003-03-25
4
Medium Priority
?
297 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
[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
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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

777 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