How to make the scrollbar of pop up window to roll down to the bottom by default

This is a discussion on "How to make the scrollbar of pop up window to roll down to the bottom by default" within the JavaScript Forum section. This forum, and the thread "How to make the scrollbar of pop up window to roll down to the bottom by default are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 14th, 2008, 06:10
New Member
Join Date: Feb 2008
Location: INDIA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
How to make the scrollbar of pop up window to roll down to the bottom by default

Hi All,

I have a php page which pops up a window using window.open.
I want the scroll bar of the pop up window to scroll down to the bottom by default.
How do I go about doing this?

Regards,
Selvin
Reply With Quote

  #2 (permalink)  
Old Feb 14th, 2008, 06:13
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

All you need to do is place an anchor link at the bottom

<a id="bottom"></a>

And when you load the page add #bottom to the URL

http://www.example.com/index.php#bottom
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
  #3 (permalink)  
Old Feb 15th, 2008, 05:33
New Member
Join Date: Feb 2008
Location: INDIA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

Thanks Rakuli for ur reply . I am still unable to make the scroll bar move to the bottom by default.

I will elaborate a bit more of the exact scenario:

On click of a button , a window pops up using the following code from php page:

echo "<script>window.open('log_show?param1=$val1&param2 =$val2&param3=$val3', 'log', 'height=550,width=800')</script>";

val1 ,val2,val3 are passed to the log_show and used there. val3 here is #button as u have mentioned.

log_show is a function where I create a text area and write the contents of the text file into the text area using a foreach loop.

I have added the anchor tag <a id="button"></a> at the end of the function ( after closing the text area tag). I have also tried it at the end of echo statement.

Still I am unable to make the scroll bar move down.

Please suggest a solution.

Regards,
Selvin
Reply With Quote
  #4 (permalink)  
Old Feb 15th, 2008, 17:42
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

Just change the script line to

Code: Select all
echo "<script>window.open('log_show?param1=$val1&param2 =$val2&param3=$val3#button', 'log', 'height=550,width=800')</script>";
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Reply With Quote
  #5 (permalink)  
Old Feb 16th, 2008, 05:31
New Member
Join Date: Feb 2008
Location: INDIA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

I made the change . still it is not working ..

part of the code in the function called by window.open is as follows:

?>

<textarea rows="30" cols="95"><?
$val = $_GET['param1'];
$fullpath = urldecode($val);

$data = file($fullpath);
foreach($data as $value) {
echo "$value";
} ?>
</textarea>
<a id="bottom"></a>

.. Am I going wrong in placing the anchor place ?
Reply With Quote
  #6 (permalink)  
Old Feb 16th, 2008, 09:06
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 825
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

This may be s stupid idea, but could you do it through htaccess.

I do not know how, but there is a way i am sure of changing the first page loaded, eg. when you type in www.website.com, you are sent to /portfolio instead of /index.

What i am saying is, could you do what rakuli said
Quote:
Originally Posted by Rakuli View Post
All you need to do is place an anchor link at the bottom

<a id="bottom"></a>

And when you load the page add #bottom to the URL

http://www.example.com/index.php#bottom
but in the htacces file, change the default page to http://www.example.com/index.php#bottom ?

I will try and find the way to do this, bear with me
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
  #7 (permalink)  
Old Feb 16th, 2008, 09:10
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 825
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to make the scrollbar of pop up window to roll down to the bottom by default

http://www.javascriptkit.com/howto/htaccess6.shtml

Here is how to change the default directory page, try setting it to http://www.example.com/index.php#bottom
when you have pasted <a id="bottom"></a> into your site.

It is not the most attractive way, but if it works it's simply enough.
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I make info in a JS pop up window accessible to non JS users? Oak JavaScript Forum 8 May 20th, 2008 18:55
How do I make Button Open new window in flash? bunnyface Flash & Multimedia Forum 4 Feb 27th, 2008 21:41
Image roll over pop up acrikey Web Page Design 12 May 2nd, 2007 15:31
How to make pop-up window fit client's screen maurice JavaScript Forum 3 Mar 15th, 2005 17:54
need help with Roll over stylesheet. comaiwat Web Page Design 8 Sep 21st, 2004 02:34


All times are GMT. The time now is 01:09.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43