Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Problems with loadVariables, asp

Status
Not open for further replies.

JHerr

Programmer
May 25, 2001
42
0
0
US
Hi all,
i have a project with an access db on the backend and i'm using asp to bring in data i have several places where i the following kind of code:

loadVariables ("viewbook.asp",Book,"Get")

which naturally produces an asp page with something like
"entry=blah blah blah" to load a textbox with a var name entry. the textboxes are all fairly large with a scrollbar.

I have two wierd problems i've run into. The first is that when someone first loads the frame with the code to bring in the data, it only seems to load the textbox size of data, or perhaps it loads all of it, but the scrollbar doesn't activate. if you move to a different frame, then return, the full data loads into the text box and the scrollbar becomes active. this is happening on all the places i am loading data.

the second problem i have is that i have two frames that load almost identically, only different data. One loads information about upcoming events, the other is a guestbook. the thing is is that if you go to the guestbook first, then go to the events, the events page will not load the data. if you go to events first and then go to guestbook, both work fine. oddly enough, the very first frame the movie loads does the same sort of thing as these two, but doesn't seem to effect this strange error.

i don't expect anyone has had these exact errors, but i am hoping someone can point mein the right direction. thanks very much!
-jacob
 
Re your first problem - are you using MX components for your scrollbar? I've come across a couple of instances where you can trip the scrollbar up with dynamic data.

Maybe a look at your loading code or fla would help narrow this down a little.
 
Yes, i am using the macromedia components.
maybe the control loads before the data and so because it doesn't see any data in the textbox it isn't set for more data than the size of the box.

As for the coding,

this is the one for the first frame:

News_txt.wordWrap
loadVariables ("News.asp",NewsTxt,"Get")

and basically thats it.

the asp only response.writes out a "news_txt=news"
where news_text is the var name and news is various news.
The textbox is set to read it as html, and the asp sends formating along with the data, though its only <br> and <font> tags.
 
alright, i'm not sure why but the last post i entered had me logged in as &quot;JazzLeg&quot; but it was me. Odd, although its not the first time i've seen that.
-jacob
 
That's exactly what I was going to suggest for the first problem - the component loads in the first frame of the movie by default - before the data does. Once the text box is filled and the screen is refreshed by going back then the scroller acts the way you expect. One way round this is to load content into the textbox in the authoring environment (just some spaces with carriage returns) which force the scrollbar to be enabled by default.

Maybe the second problem is something to do with the amount of data loading in? If the guestbook has more data and you go there first it will take longer to load and Flash won't have time to load it in and display it. If you go to the guest book second it's had time to load fully...

Try building in a loop that waits for the data to fully load or use onClipEvent(data) and see if this corrects the problem.
 
wangbar-
thanks first of all for your responses.

i tried filling the textbox in the design envrionemtn like you suggested, and it worked to the extent that the scrollbar did work, but it was still only formating its boundaries to the carrage returns inthe textbox when it loaded.

as for the second issue, i'm not sure its a data issue, only because righ now the data i'm loading isn't very much and it actually does all load. its just odd that its so particular. if you go to the events first, everything works like it should (aside from the first error of course), but if you go to the guestbook first, the events won't load. yet the very first frame does the exact same thing as both the events and the guestbook. i think what i will try next is loading the data from the guestbook onto the first screen and vice versa to see if that makes a difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top