Click to See Complete Forum and Search --> : dont know how..... pls help
niroshan
04-03-2003, 11:49 PM
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
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 server side. That's all I can tell you..
niroshan
04-04-2003, 12:58 AM
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
bennycfw
04-04-2003, 04:29 AM
Hi guys , can anyone help me with IF ..... ElseIf statement ?
I don't know the correct way to write the statement, please help me....
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:
<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>
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
bennycfw
04-04-2003, 09:12 AM
Thank so much guys ...... however.....
if i really got a lot of "else if" ....then how should i write it ?
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; }
Originally posted by niroshan
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
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. :)
niroshan
04-05-2003, 12:42 AM
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.
khalidali63
04-05-2003, 01:28 AM
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
niroshan
04-07-2003, 11:24 PM
hi guys,
thnkx for every body for replying. i really really appreciate it. keep up the good work guys.
niroshan