|
-
Feb 6th, 2002, 11:37 AM
#1
Thread Starter
Frenzied Member
progress bar still going long after javascript function is done
This code was dynamicly built via ASP. if I click on the item it runs the javascript function imidiatly but the progress bar sloooooooooooowly goes across. It seems if I click another onclick like this one (the page has a list of these dates) then it dosent do it but then if I click a third then it will again,,, like it only happens on the odd number of clicks.
Code:
<a href="JavaScript:void(rateChange('1'));" class="item">
<img src="images/I.gif" align="absmiddle" border="0">
<img src="images/I.gif" align="absmiddle" border="0">
High Season<br>
<img src="images/I.gif" align="absmiddle" border="0">
<img src="images/T.gif" align="absmiddle" border="0">
8/1/01-8/1/02
</a>
thanks in advance,
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 7th, 2002, 04:35 AM
#2
Hyperactive Member
Need some more info here, what does the void function and the raeChange function do???
void(rateChange('1'))
post these any any dependant functions please!
Then maybe we can fugure this out!
-
Feb 7th, 2002, 10:40 AM
#3
Thread Starter
Frenzied Member
the void dosen't do anything (like when using a "a href" to do a mouseOver you either add # to the href or "javascript:void()" ). The reason I threw the void in there (I tried href=Javascript:rateChange(var) but on another messageboard I saw this suggestion. I'll post the rateChange function but I'm pretty sure it dosent have any thing to do with this... I have the same problem on a different area of this project. Also I failed to mention, it dosent happen if I use an onClick. If I just change the function to call from an onClick then it is fine, I cannot remember why at the moment but there is some place that this is happening that I didnt want to use an onClick but rather wanted to use the href method.
Code:
function rateChange(newVar){
window.open('rate_change.asp?Mode=ChangeRate&Rate=' + newVar , 'DoStealth');
}
basicly this just gets a number and then builds a page via asp that will use outerHTML to change some values. an example of the output is (I added the ~>'s because I dont like the way the lines make the vb forum screen so wide. They (and the carrage returns) are not im the code):
Code:
<html>
<body bgcolor="#666666" text="#ffffff">
<script>
with (parent.frames[2].document.all){
block_R1_C1.outerHTML = '<div id="block_R1_C1" align="center">Winter 2: 1/1/02-2/28/02</div>';
ratedescription.outerHTML = '<textarea name="ratedescription" style="WIDTH: 428; HEIGHT: 125" ~>
onChange="updateDatabase(parent.frames[0].document.all.PickHotel.options[parent.frames[0].document~>
.all.PickHotel.selectedIndex].value)">just Testing the memodescript field</textarea>';
}
</script>
</body>
</html>
thanks for any ideas you may come up with 
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 7th, 2002, 11:13 AM
#4
-
Feb 7th, 2002, 12:10 PM
#5
Thread Starter
Frenzied Member
sorry, I cannot send the direct url to ths page w/the problem. It is part of a back end system and is connected to sensititive data. If I get the time I will see if I can make a 'mock up' type of this site and see if it still gets the same problem. If so I'll send you a line.
Thanks
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 7th, 2002, 12:14 PM
#6
Hyperactive Member
No probs!
I'd test it on differnet versions of IE if I was you though, like I said
FYI: I've come across symptoms similar to yours before
and the ones that I have come accross have usually been down
to the version of IE being used!
-
Feb 8th, 2002, 10:13 AM
#7
Thread Starter
Frenzied Member
yes, got it (its 9:07 am here, just got in). I'll check out some of the suggestions and let you know.
Thanks!
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 8th, 2002, 10:24 AM
#8
Hyperactive Member
Thats a shame my work days nearly over (3:25 here) I've just
been to the pub for dinner and now I'm waiing (don't want to do
anything to a script that might break it on a friday afternoon) until
5:30 then I'll be out of them doors like a shot......that means if
you have anymore queries you've got about an hour and a half to
get them in !
---------
Dave
-
Feb 8th, 2002, 10:45 AM
#9
Thread Starter
Frenzied Member
>>try putting two seperate <a></a> tags around
the seasons/dates
The problem with that is I need the both the season and date to hilight when one or the other is moused over and the only way I could think to do that was to put a css :hover in the a tag and surround the both of them.
>>removing the '' from around the numbers
and remove the void() function
removing the '' didnt change anything and I actually added the void() because someone suggested it to fix this problem when I had it before 
as for the long line, it did this before I added that section and that table is actualy generated by ASP earlier in the code so I cant break it up... and when I load the default 1st season on page load and it shows the checkboxes incorrectly (both named rate1) thats my fault I guess I write dynamic code better than static.
>>I wouldn't worry to much about it, your program as far as I can tell works correctly
I wish I didn't have to but the users think that something is being done and that they have to wait for it to go (sometimes it will go for 20 mins (on DSL here)) even though the page took less than 1 full sec.
thanks for the help, I think I'll have to place that problem on the back burner for now.
I do have another problem with this area... look at the rate area now (updated the code abit) and take note of how the colors distort the TOC tree.
If you dont have time its no hurry and I know what you mean about not wanting to break any code on a friday
thanks again
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 8th, 2002, 11:44 AM
#10
Thread Starter
Frenzied Member
but... that brings the problem of hilighting the date as well as the season... because the way the images for the TOC tree are and since it is built dynamicly (for example the last season has the L shaped line rather than the (sideways) T shaped line). If you have any ideas on that let me know.
I figured you were just getting the code by viewing the source of the DoStealth window (middle bottom frame) 
thanks
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 8th, 2002, 11:56 AM
#11
Hyperactive Member
Yeah I see what you mean, that part of the line contained in the menu item will flash.
The second solution I posted should do it then!
That solution wouldn't even need to be done with ASP you could
put all the menu items in array and make a fucntion that is
passed a number which determines the menu item you want selected.
You then loop through the array changing the one element indexed by the number to selected and the rest to unselected!
yeah that should do it!
-
Feb 8th, 2002, 11:57 AM
#12
Thread Starter
Frenzied Member
that last idea you sent worked like a dream!
I set them all to .item, to turn them black again. Then set the selected one to .itemSelected.
Thanks!
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 8th, 2002, 12:00 PM
#13
Thread Starter
Frenzied Member
k, you lost me on the array loop idea... I probably am doing it much harder:
Code:
<%
For intCount = 1 to Session(Session("HotelID") & "_RateCount")
%>
if (parent.frames[2].document.all.item<%= intCount %>){
//parent.frames[2].document.all.item<%= intCount %>.outerHTML = '<%= Session("item" & intCount) %>';
parent.frames[2].document.all.item<%= intCount %>.className='item'
}
<%
Next
%>
parent.frames[2].document.all.item<%= intRate %>.className='itemSelected'
I am more of an asp/vb programmer than javascript so my instincts are to do it that way (eventhough I bet its slower.)
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Feb 8th, 2002, 12:00 PM
#14
Hyperactive Member
cool......doh! that means i've got nothing to do now for 30 mins
Time for a quick nap i think, as i'm off to the gym on the way
home.
Have a good weekend M8!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|