Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: onclick question

Posted on 2006-09-21 00:59:01 by Todd

Hello

We have a page that loads a long list of things. Each row has an onclick
where you can open a window for more information. When you do that the parent
page refreshes to the top of the page....so if you were near the bottom, you
would have to scroll back down to get back to where you were. I would like
the parent page to hold its position when the child opens. Any suggestions?

Thank You

Report this message

#2: Re: onclick question

Posted on 2006-09-21 09:48:32 by Anthony Jones

"Todd" <Todd@discussions.microsoft.com> wrote in message
news:A9121377-9BE5-49CA-8765-031D88E63B0A@microsoft.com...
> Hello
>
> We have a page that loads a long list of things. Each row has an onclick
> where you can open a window for more information. When you do that the
parent
> page refreshes to the top of the page....so if you were near the bottom,
you
> would have to scroll back down to get back to where you were. I would like
> the parent page to hold its position when the child opens. Any
suggestions?
>
> Thank You

You would need to show us an example of the html and Javascript you are
using to achieve this.

Report this message

#3: Re: onclick question

Posted on 2006-09-21 10:46:36 by exjxw.hannivoort

Anthony Jones wrote on 21 sep 2006 in
microsoft.public.inetserver.asp.general:

>
> "Todd" <Todd@discussions.microsoft.com> wrote in message
> news:A9121377-9BE5-49CA-8765-031D88E63B0A@microsoft.com...
>> Hello
>>
>> We have a page that loads a long list of things. Each row has an
>> onclick where you can open a window for more information. When you do
>> that the
> parent
>> page refreshes to the top of the page....so if you were near the
>> bottom,
> you
>> would have to scroll back down to get back to where you were. I would
>> like the parent page to hold its position when the child opens. Any
> suggestions?
>>
>> Thank You
>
> You would need to show us an example of the html and Javascript you
> are using to achieve this.

It is not a asp = serverside, but a clientside issue, off topic.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Report this message

#4: Re: onclick question

Posted on 2006-09-21 13:49:26 by Dave Anderson

Todd wrote:
> We have a page that loads a long list of things. Each row has an
> onclick where you can open a window for more information. When you do
> that the parent page refreshes to the top of the page....so if you
> were near the bottom, you would have to scroll back down to get back
> to where you were. I would like the parent page to hold its position
> when the child opens. Any suggestions?

Yes. Stop using <a href="#" onclick="...">. There is no need to use anchor
tags when a change of page is not desired. The [onclick] attribute applies
to virtually every element, not to mention the [cursor] CSS rule:

http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
http://www.w3.org/TR/CSS21/ui.html#propdef-cursor



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Report this message

#5: Re: onclick question

Posted on 2006-09-21 15:48:01 by Todd

here is the line of code

<td align="center"><a href="#"
onclick="window.open('ncdr.asp?view=ncdr&id=<%=rsncdr("id")%> ','NCDR','toolbar=0,location=0,directories=0,status=0,menuba r=1,scrollbars=1,resizable=0,copyhistory=0,width=740,height= 500')"><img
src="../images/view.gif" border="0" alt="View NCDR#
<%=branchloc%>-<%=rsncdr("ncdrnum")%>"></td>

If the onclick is the issue, what would be the best way to achive the same
result

Thank You

"Dave Anderson" wrote:

> Todd wrote:
> > We have a page that loads a long list of things. Each row has an
> > onclick where you can open a window for more information. When you do
> > that the parent page refreshes to the top of the page....so if you
> > were near the bottom, you would have to scroll back down to get back
> > to where you were. I would like the parent page to hold its position
> > when the child opens. Any suggestions?
>
> Yes. Stop using <a href="#" onclick="...">. There is no need to use anchor
> tags when a change of page is not desired. The [onclick] attribute applies
> to virtually every element, not to mention the [cursor] CSS rule:
>
> http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
> http://www.w3.org/TR/CSS21/ui.html#propdef-cursor
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message. Use
> of this email address implies consent to these terms.
>
>
>

Report this message

#6: Re: onclick question

Posted on 2006-09-21 17:57:09 by Dave Anderson

[please do not toppost]

Todd wrote:
> <td align="center"><a href="#"
> onclick="window.open(...)">
>
> If the onclick is the issue, what would be the best way
> to achive the same result

Onclick is not the issue. <a> is the issue. Don't use it if it is not
appropriate to do so:

<td onclick="window.open(...)">

Take a look at what I suggested once again:

>> Yes. Stop using <a href="#" onclick="...">. There is no need
>> to use anchor tags when a change of page is not desired. The
>> [onclick] attribute applies to virtually every element, not
>> to mention the [cursor] CSS rule:
>>
>> http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
>> http://www.w3.org/TR/CSS21/ui.html#propdef-cursor



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Report this message

#7: Re: onclick question

Posted on 2006-09-21 18:29:03 by Todd

"Dave Anderson" wrote:

> [please do not toppost]
>
> Todd wrote:
> > <td align="center"><a href="#"
> > onclick="window.open(...)">
> >
> > If the onclick is the issue, what would be the best way
> > to achive the same result
>
> Onclick is not the issue. <a> is the issue. Don't use it if it is not
> appropriate to do so:
>
> <td onclick="window.open(...)">
>
> Take a look at what I suggested once again:
>
> >> Yes. Stop using <a href="#" onclick="...">. There is no need
> >> to use anchor tags when a change of page is not desired. The
> >> [onclick] attribute applies to virtually every element, not
> >> to mention the [cursor] CSS rule:
> >>
> >> http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
> >> http://www.w3.org/TR/CSS21/ui.html#propdef-cursor
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message. Use
> of this email address implies consent to these terms.
>
>
>
Thank You...I see what you mean now.....is there a way to replicate the
"finger cursor" that comes up when an anchor is used...looked into
onMouseover but this seems to change the text that the mouse is moving over,
not the curser itself. Appreciate the help

Report this message

#8: Re: onclick question

Posted on 2006-09-21 20:29:54 by Dave Anderson

Todd wrote:
>>>> ...The [onclick] attribute applies to virtually every
>>>> element, not to mention the [cursor] CSS rule:
>>>>
>>>> http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
>>>> http://www.w3.org/TR/CSS21/ui.html#propdef-cursor
>>
> Thank You...I see what you mean now.....is there a way to
> replicate the "finger cursor" that comes up when an anchor
> is used...looked into onMouseover but this seems to change
> the text that the mouse is moving over, not the curser
> itself.

Again, my original response contains the answer. You can use styles inline
or through a CSS rule. Here is inline:

<td stlye="cursor:pointer" onclick="...">




--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Report this message

#9: Re: onclick question

Posted on 2006-09-21 20:49:02 by Todd

"Dave Anderson" wrote:

> Todd wrote:
> >>>> ...The [onclick] attribute applies to virtually every
> >>>> element, not to mention the [cursor] CSS rule:
> >>>>
> >>>> http://www.w3.org/TR/html4/interact/scripts.html#adef-onclic k
> >>>> http://www.w3.org/TR/CSS21/ui.html#propdef-cursor
> >>
> > Thank You...I see what you mean now.....is there a way to
> > replicate the "finger cursor" that comes up when an anchor
> > is used...looked into onMouseover but this seems to change
> > the text that the mouse is moving over, not the curser
> > itself.
>
> Again, my original response contains the answer. You can use styles inline
> or through a CSS rule. Here is inline:
>
> <td stlye="cursor:pointer" onclick="...">
>
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message. Use
> of this email address implies consent to these terms.
>
>
>
Thank you...I didn't fully understand your original response, however, it
makes perfect sense now...most appreciated!

Report this message

#10: Re: onclick question

Posted on 2006-09-21 22:36:39 by Dave Anderson

Todd wrote:
> Thank you...I didn't fully understand your original
> response, however, it makes perfect sense now...most
> appreciated!

My pleasure. It is no surprise to me that you were using <a href="#" ...>,
since there are SO MANY examples out there that use it. This is partly
because there were few alternatives many years ago, and that "trick" worked
for most browsers.

But Microsoft has applied onclick to most elements since version IE4, and
virtually everyone else has done so for the last 5 years, so it is no longer
necessary. Nevertheless, I estimate it will take at least more 5 years for
the practice to fade from documentation and use.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Report this message