Win a copy of Rust Web Development this week in the Other Languages forum!

Terri Layman

Greenhorn
+ Follow
since Nov 03, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Terri Layman

Eric Pascarello wrote:Grab the date object and calculate the time difference and use that time to set the setTimeout.

FYI, computer clocks are not the same so they will be off. Your system is going to be hammered all at once if you have a bunch of users using the system.

Eric



Thanks. I'll look into it. I think I was trying to use a variation on it before and having some issues, so hopefully it'll work better this time.

And I know the clocks may not be entirely the same, but this is an effort to get the refreshing of the data more "in sych". And I don't think our system is going to be too taxed. It's entirely an internal system, and only about 25 people in the whole of the company have access to it.

Thanks again....
I've got a dashboard system that creates various production reports for my company. Right now it refreshes in 5 minute increments (using javascript), starting at the time the system is accessed. This obviously means that two people looking at the same screen can be viewing data that's up to 5 minutes off from one another.

In an effort to make it more of an "Apples to Apples" situation, I'd like to get the time that the user signs on, calculate the difference between that and the next "5" of the hour, have it refresh at that time then every 5 after. (So, if the user signs on at 9:31:30 it'll calculate the difference between then and 9:35, refresh at 9:35, then start refreshing every 5 minutes after that.) Also, I'd need to be able to call this on a "manual refresh" situation, where the user hits a refresh button. The system should only automatically refresh at 0, 5, 10, 15, ... 55 minute marks.

So far I'm not having much luck figuring out how to do the calculation.

Does anyone have any suggestions as to how to go about this?

Thanks!
Hi.

I have a company events calendar. The calendar itself is created via the YUI calendar module. When a shaded date is clicked on, it launches a new window with the events for the day in it, then an event can be selected to get the details in the same window (retrieved via plain old Struts logic). All that works well.

I'm now trying to add in the YUI tooltip module, and attach a tooltip to each shaded date. The tooltip would contain a very short summary of the events for the day (retrieved via Struts/Ajax). And I have it mostly working. The last remaining issue it has is that it for some reason does not display the first time the date is hovered over. (Causing the user to have to hover over oh, July 4th twice to find out that it's shaded due to the US Holiday.)

I don't know if this is a good place to ask, but given that I've asked over at the YUI forums and got no response, I thought I'd put something up here to see if anyone here had an idea as to why it isn't working correctly. I've both tried to slow down the display of the tooltip, and tried to speed up the AJAX, but neither seemed to work.

My code is below.

Thanks in advance for any assistance!
-TerriLyn

David,

Thanks for looking at it, but I think I may have sorted it out.

At the point in the code that calls the "storeValues()" I changed how the array is constructed.



At that point it constructs the array that gets passed to the storeValues. It also checks to see if the arraylist in the form is empty, if it's not it overrides the inital construction of the arraylist with the constructor that loads it from the form.

Then in the storeValues(), I'm getting the "Week Info Count" (your referenced badly named wIc). That gives me the position where to add another object (WCI) to the "overall" arraylist. I then set the arraylist in the form to the value of the new "local" arraylist.



Make sense?

Now if I could only get it to STOP re-appending the new data to the arraylist once the summary page is drawn, should the user hit the refresh button or some such, life would be golden, and I'd be down to format clean up.

Thanks for looking!

-Terri
11 years ago
Good Morning (or whatever it may be for you!)

I am trying to add items to an arraylist. I know all about the arrayList.add(). However, the problem I'm running into is that I am using an object to hold the data (its summarization information for a report) of ExpenseItem, and I can't manage to get an arraylist to build properly so that it can be displayed. What I am doing is below:



So, as you can see, I bring in an external array, populate it from the form if data exists in the form, adding data to the array, and then writing it back to the form. It sounds like it should work, but I'm getting some really unexpected results when I do a println off the arrayList. I'm getting something similar to below:



Any ideas on how to make it one consistant arraylist?

Thanks,
-TerriLyn
11 years ago
I am currently upgrading our business's production metrics dashboard. Previously, the data was delivered once and to get new data you had to hit the refresh button on the browser.

Now, they want the data to auto-refresh every 5 minutes. And be synchronized between users, so in theory, based off server time.

So, using an ajax call, I retrieve the time off the server, and then pass it into my javascript. Then I calculate the seconds remaining until the next five minute interval start time (eg: 00/05/10/15... past the hour). Then it runs down that time frame, refreshes the modules, (they are displayed in Iframes), and resets the seconds count to 300 and then repeats the refresh/repop when it hits zero.

That basic code works, and does so fairly well for the most part.

The problem I'm having with it though is one that I only noticed after allowing it to run for awhile in the background on two browsers (IE and FF)and then monitoring it.

The IE instance seems to catch the very last bit of the minute it's in when it goes to redraw the "last updated" message, so instead of displaying an expected 11:55, it displays 11:54 also, as time goes on, it slips further back. So eventually you're redrawing at like 12:32 instead of 12:35. And the FF instance seems to grab near the end of the timeframe to redraw that message. It will initially redraw at 11:55 and say so, but as time elapses, it'll insert a refresh time of 12:16 or similar.

So, on the surface, it looks like FF might be running a tiny bit fast, and IE running slow. Either way, it's causing the "synch" to not happen when and how it should. This is an obviously undesireable issue.

Has anyone else come into contact with similar issues, and if so, how have you resolved them?

Thanks,
-TerriLyn

PS: Here's my timer code, as an FYI. Let me know if any other supplementary code would be helpful!

Here's my code for that page. Sorry I didn't include it earlier.

First the main page. (rmaInit.jsp)


And here's ajaxObject.js, just in case you need to reference it.


Thanks!
-Terri
I'm working on a webform that uses Struts and Ajax to prepopulate much of the data based off an ID number supplied by the user.

It works absolutely perfectly in IE.

It doesn't even think about firing the AJax calls (fired in an OnBlur() of the text box for the last part of the ID) in FireFox.

Am I missing something here?

I thought onBlur() was cross browser supported.

Similarly, I have two dependant drop downs. The second one is supposed to populate based on an onChange() of the first.

That's not working either in FireFox, but is perfect in IE.

Any thoughts about what might be wrong?

Thanks,
-Terri
I just checked and the same behavior seems to happen in FireFox.

If anyone would like anymore code for this, I"ll post what you ask for.

Thanks,
-Terri

Eric Pascarello wrote:What is the requery? Ajax call? Browser refresh? And what browser are we talking about here?

Eric



The browser is IE7.

As for what exactly the re-query is, I'm not completely sure (it was built by an external company). I do know that it takes the current date and then submits the Java Struts forms (multiple mini-reports populate divs on the screen) to the server and it redisplays it. (If it's germaine to the discussion at all, the front end for this site is based off the YUI V3 Portal Style example here: http://developer.yahoo.com/yui/3/examples/dd/portal-drag.html.)

I'm just really confused because if I *watch* it, it works. If I go off elsewhere to multitask (like to open another tab and read up on why cookies aren't staying set in Firefox on this same app), the countdown does run out, and it supposedly does trigger a couple of the precursors to the data re-query, but not the re-query itself. The only thing that I can think of that might be why it's requiring the browser to be in focus is the following "trigger" line of code:



The dateChange logic from the portals.js (the original version of this is at the website above) is below, but I can't make sense of it (done by same outside company), but since I know it works when "babysat".... I don't think I would be any less confused if I understood it 100%.



I don't know if this has been helpful at all, but thanks for looking!

Thanks,
-Terri
All,

I have an application that runs on our company intranet. It's supposed to re-query the servers for new information every five minutes.

And, for the most part, it works.

However, I've noted that when I'm off working in another browser, or browser tab on the same browser, that the countdown javascript runs (including the resynch with server logic), but the javascript to trigger the query of data on the server does not. The whole part (including the data requery) works fine when the browser is in focus.

Is there some issue with javascript and some methods not running if the browser is not in the foreground?

I've not heard that there is, but I know that sometimes it's possible in other non-browser apps.

Thanks,
-Terri

David Newton wrote:That looks like simple Ajax-oriented stuff; if the contents of the draggable windows are Ajax requests then just use the Struts actions as the request targets and put the resulting HTML into a target div.



I'm not too up on AJAX. So, uh... how would you do that?

Thanks.
-Terri (the clueless, apparently)
12 years ago
I have a production dashboard that tracks, in table format, various production items in the company.

However, since some of the data is unrelated to other parts, (also for modularity) I created each "category" of data in it's own module. Eg; quoted shopping carts are in one /action.do, and the number of units shipped is in another. These are all loaded via IFRAME into a "master" page.

Now we want to change the site and make it more dynamic and user friendly. We're looking at implementing the portal system found in Yahoo's YUI suite (info: http://developer.yahoo.com/yui/3/examples/dd/portal-drag.html). It doesn't seem to like Iframes being loaded into it's modules (drops functionality, and won't populate the module menu if all the items are iframes)

I found an IncludeAction thing, but I don't think that's ultimately going to work for me.

Does anyone else have any idea on what alternates to the Iframe solution currently in place there might be?

Thanks,
-Terri
12 years ago

Eric Pascarello wrote:what happens if you change it to block instead of inline?

Eric



It seems to be working. I could kiss you. I've been working on this for TWO days now!



Thanks so much!!!

-Terri
Hello,

I'm trying to get a map to display under the address for a business
listing when a "Map It" link is clicked (opening a hidden div), and I
currently have it working properly in IE. However, it is broken in
Firefox. I have images for the problem. First the working IE model:

http://farm4.static.flickr.com/3335/3488442547_b30cbfbc77.jpg

And then the broken Firefox model. I have turned on in this image
some block-level outlining tools, so you can see that despite it being
all twisted around, there does seem to be a container of sorts being
drawn with map controls and the Google logo inside it.

http://farm4.static.flickr.com/3299/3488442647_91aca111d7_o.jpg

Unfortunately, I cannot link to a "working site" due to limitations
here at my work. However, below is all my map-related javascript, the
"firing link" and the div tag.

Any suggestions on why this isn't working would be great.

As an FYI, the "googleKey" parameter is dynamically fed in on the
background through Java Struts.

Thanks,
-Terri


Javascript:


Body tag:



Firing link:



Table row with div tag: