/    Sign up×
Community /Pin to ProfileBookmark

dont know how….. pls help

Hi,
I have a page having three frames and all the three frames are linked with different pages. The middle frame has scroll bars inserted and it gets refreshed after every 10000 milliseconds. The contents of this page will be added dynamically so when it refreshes the contents will add up.
When the content increases the scroll bars will automatically display.
My problem is that since this page gets refreshed every time, when the page reappears the focus will go to the top of the page instead of the bottom.
What I want is when the page is refreshed and reappears it should display the bottom of the page instead of the top.

I would really appreciate it if someone can help me out with this problem.

Thanks,

Niroshan

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@JonaApr 04.2003 — When you click "back" you will notice that you return to the page you were previously at, and if you scrolled down, the exact spot where you click the link that sent you to the previous page (or current page until you click "back"). When a page refreshes, the "back" effect of the cache does not work. Thus, what you are trying to accomplish may only be done with anchor names (<a name="#etc">) dynamically generated [i]server side[/i]. That's all I can tell you..
Copy linkTweet thisAlerts:
@niroshanauthorApr 04.2003 — hi,

thank you very much for your reply.

When the middle page refreshes I pass a value. For example, an Id. The url will look like this,

URL - clientDisplayCenter.php?id=1

I tried putting an anchor tag in the bottom of the page and when I call the ‘clientDisplayCenter.php’ file I tried to pass this anchor name along with the id as shown below,

Anchor name= aa

URL - clientDisplayCenter.php?id=1&#aa

But sadly it didn’t work.

How can I find a solution for this ?

Thanks,

niroshan
Copy linkTweet thisAlerts:
@bennycfwApr 04.2003 — Hi guys , can anyone help me with IF ..... ElseIf statement ?

I don't know the correct way to write the statement, please help me....
Copy linkTweet thisAlerts:
@IxxIApr 04.2003 — You'd be better posting unrelated questions in a new thread, because it means people will see them. Anyway, say you are trying to determine if a variable (x) has the value 3, 4 or something else, and then display that value in an alert box you'd have this:

[CODE]
<HTML>
<HEAD>
<TITLE> If Statements </TITLE>
<script>
function statif() {
var x=3
if (x==3) { alert(x) }
else if (x==4) {alert ("x is equal to four") }
else { alert ("No x's here...") }
}
</script>
</HEAD>
<BODY>
<form>
<input type="button" onClick="statif()" value="Click Me!">
</form>
</BODY>
</HTML>
[/CODE]


If you change the value of x (in the line var x=3) then what the alert says changes.

In essence you have:

if (statement is true/false/etc.) { do this }

else if (statement is something else) { do this }

else { do this }

Hope this helps,

IxxI
Copy linkTweet thisAlerts:
@bennycfwApr 04.2003 — Thank so much guys ...... however.....

if i really got a lot of "else if" ....then how should i write it ?
Copy linkTweet thisAlerts:
@JonaApr 04.2003 — Just keep adding else if(variable==condition) { continue; } else if(variable2==condition2) { continue; } else if(variable3==condition3){ continue; } else { if it's anything else.. do this; }
Copy linkTweet thisAlerts:
@JonaApr 04.2003 — [i]Originally posted by niroshan [/i]

[B]hi,

thank you very much for your reply.

When the middle page refreshes I pass a value. For example, an Id. The url will look like this,

URL - clientDisplayCenter.php?id=1



I tried putting an anchor tag in the bottom of the page and when I call the ‘clientDisplayCenter.php’ file I tried to pass this anchor name along with the id as shown below,

Anchor name= aa[/B]
[/QUOTE]


Okay, here's an idea. Every time the page is reloaded, use PHP to write to the end of the file an anchor tag with the letter "a" infront of it, and a number (that goes by increments, 1 then the next will be 2, then the next will be 3.. etc. Use a while() loop probably). So every time the page is loaded there is a new anchor in the source code. So the PHP will be adding a new anchor tag to the source code with a new name (a+n where "n" is a number that increments by one), and automatically have the page onload redirect to the last anchor on the page. This will take both server side and client side scripting most likely. If you need to automatically go to the last anchor on the page, I can do the Javascript. I can probably also do the PHP, but since you know PHP (right? ? ) you can probably do that. ?
Copy linkTweet thisAlerts:
@niroshanauthorApr 05.2003 — Hi,

My problem is that I have put an anchor tag in the bottom of the page but I can’t figure out how to pass the url as the filename+id+anchor name,

For example,

clientDisplayCenter.php + id + < anchor name (aa)>


It is important that I pass the ID as it helps to fetch the data from the database of the current page (clientDisplayCenter.php). And also will need to pass the anchor tag name because the page should point to the exact location.

I would really appreciate it if some one can give me a solution to join these two ID`s together in the URL.


Thanks,

Niroshan.
Copy linkTweet thisAlerts:
@khalidali63Apr 05.2003 — Try these links and see if thats what you wanted to get done

The first one I wrote keeping your need in mind.

in the first page when you press Process it gets a number and pass it to next page via url

On the next page it parses the URL and gets the id out of it and then navigates internally to an internal link on the page.


http://68.145.35.86/temp/RadioSelectAndTotal.html

http://68.145.35.86/skills/javascripts/frames/InternalNavigation-main.htm

Cheers

Hope this helps

Khalid
Copy linkTweet thisAlerts:
@niroshanauthorApr 08.2003 — hi guys,

thnkx for every body for replying. i really really appreciate it. keep up the good work guys.

niroshan
×

Success!

Help @niroshan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...