HighDots Forums  

how to fix this

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss how to fix this in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Mike Scirocco
 
Posts: n/a

Default Re: how to fix this - 03-14-2006 , 05:31 PM






Eric wrote:
Quote:
Mike Scirocco wrote:


Eric wrote:

I've got a table (in a frame) like the sample below where the whole cell
is click-able. This works well except I'd like the cells to show standard
link behavior for the cell text, so if the cell link has been visited the
cell text would be a diferent color etc. Any ideas on how to do this?
Thanks
Eric

TABLE id="test" border='0' cellspacing='0' cellpadding='0'
TR


onmouseover="this.style.background='#0860a8';this. style.cursor='pointer'"

onmouseout="this.style.background='';"
onclick="parent.top.location='http://home_loc.com'"
td>Home</td
/TR
TR


onmouseover="this.style.background='#0860a8';this. style.cursor='pointer'"

onmouseout="this.style.background='';"
onclick="parent.Window.location='Travels/Travels.html'"
td>Our Travels</td
/TR
/TABLE

How about this approach:

onclick="parent.document.location.href='http://home_loc.com'"

onclick="parent.document.location.href='http://www.google.com'"

!-- Travels/Travels.html --

Mike

Well, thanks for answering but i think you missed the point. How is that
going to fix my problem? Maybe I'm not explaining this well enough. I want
the color of the text in between <td> and </td> to change just like if it
was a link and not just plain text. ie: if you click on the cell to go to
wherever the cell points to the text should change color to the same color
as a visited link color would be.
Eric
Sorry, lack of sleep, Randy provided a good approach.

Mike


Reply With Quote
  #12  
Old   
Wojtek Bok
 
Posts: n/a

Default Re: how to fix this - 03-15-2006 , 10:04 AM






Randy Webb wrote:
Quote:
Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a function
which changes the state of the variable and changes the CSS for the link
(thus changing its colour). Use Ajax to send the new state back to your
server. Finally visit the link.

When refreshing the page, use the state information to set the starting
values for the variable and CSS.

Ajax? never heard of it. In any case I wouldnt want to install some new
enivronment just to solve a table cell problem.


AJAX is Asynchronous Javascript and XML. And it is the *worst* way to
get data to the server in a cross-browser environment.

Sure, tell that to Google.

And at any rate, you do not need to actually use XML. You can send
anything back and forth.


Reply With Quote
  #13  
Old   
Randy Webb
 
Posts: n/a

Default Re: how to fix this - 03-15-2006 , 11:32 AM



Wojtek Bok said the following on 3/15/2006 11:04 AM:
Quote:
Randy Webb wrote:
Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a function
which changes the state of the variable and changes the CSS for the
link
(thus changing its colour). Use Ajax to send the new state back to your
server. Finally visit the link.

When refreshing the page, use the state information to set the starting
values for the variable and CSS.

Ajax? never heard of it. In any case I wouldnt want to install some new
enivronment just to solve a table cell problem.


AJAX is Asynchronous Javascript and XML. And it is the *worst* way to
get data to the server in a cross-browser environment.

Sure, tell that to Google.
And you think Google is cross-browser?

Quote:
And at any rate, you do not need to actually use XML. You can send
anything back and forth.
My reference was not to the XML portion. The HTTPRequestObject, which
AJAX is built on, is the the least reliable way to get data to the
server when compared to other methods that are available. And especially
other methods that are more widely supported.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
  #14  
Old   
Wojtek Bok
 
Posts: n/a

Default Re: how to fix this - 03-16-2006 , 08:58 AM



Randy Webb wrote:
Quote:
Wojtek Bok said the following on 3/15/2006 11:04 AM:

Randy Webb wrote:

Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a function
which changes the state of the variable and changes the CSS for the
link
(thus changing its colour). Use Ajax to send the new state back to
your
server. Finally visit the link.

When refreshing the page, use the state information to set the
starting
values for the variable and CSS.

Ajax? never heard of it. In any case I wouldnt want to install some new
enivronment just to solve a table cell problem.

AJAX is Asynchronous Javascript and XML. And it is the *worst* way to
get data to the server in a cross-browser environment.

Sure, tell that to Google.
And you think Google is cross-browser?
Um, yes. At least the major players. I am sure someone somewhere has a
version which does not work, but for the vast majority it works well.

Quote:
The HTTPRequestObject, which
AJAX is built on, is the the least reliable way to get data to the
server when compared to other methods that are available. And especially
other methods that are more widely supported.

Such as? And don't say get and post because we are talking about "behind
the scenes" processing.


Reply With Quote
  #15  
Old   
Randy Webb
 
Posts: n/a

Default Re: how to fix this - 03-16-2006 , 10:16 PM



Wojtek Bok said the following on 3/16/2006 9:58 AM:
Quote:
Randy Webb wrote:
Wojtek Bok said the following on 3/15/2006 11:04 AM:

Randy Webb wrote:

Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a function
which changes the state of the variable and changes the CSS for
the link
(thus changing its colour). Use Ajax to send the new state back to
your
server. Finally visit the link.

When refreshing the page, use the state information to set the
starting
values for the variable and CSS.

Ajax? never heard of it. In any case I wouldnt want to install some
new
enivronment just to solve a table cell problem.

AJAX is Asynchronous Javascript and XML. And it is the *worst* way
to get data to the server in a cross-browser environment.

Sure, tell that to Google.
And you think Google is cross-browser?

Um, yes. At least the major players.
It is far from cross-browser when it comes to the scripting code it uses
in it's "AJAX" code.

Quote:
I am sure someone somewhere has a
version which does not work, but for the vast majority it works well.
Probably 90% of people on a MAC don't have support for the HTTPRequest
Object.

Quote:
The HTTPRequestObject, which AJAX is built on, is the the least
reliable way to get data to the server when compared to other methods
that are available. And especially other methods that are more widely
supported.

Such as? And don't say get and post because we are talking about "behind
the scenes" processing.
Dynamically loading .js files. It is much more widely supported than the
HTTPRequest object is.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
  #16  
Old   
Wojtek Bok
 
Posts: n/a

Default Re: how to fix this - 03-20-2006 , 09:14 AM



Randy Webb wrote:
Quote:
Wojtek Bok said the following on 3/16/2006 9:58 AM:

Randy Webb wrote:

Wojtek Bok said the following on 3/15/2006 11:04 AM:

Randy Webb wrote:

Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a
function
which changes the state of the variable and changes the CSS for
the link
(thus changing its colour). Use Ajax to send the new state back
to your
server. Finally visit the link.

When refreshing the page, use the state information to set the
starting
values for the variable and CSS.


Ajax? never heard of it. In any case I wouldnt want to install
some new
enivronment just to solve a table cell problem.


AJAX is Asynchronous Javascript and XML. And it is the *worst* way
to get data to the server in a cross-browser environment.

Sure, tell that to Google.

And you think Google is cross-browser?

Um, yes. At least the major players.

It is far from cross-browser when it comes to the scripting code it uses
in it's "AJAX" code.
This is silly. No one is using Netscape 1.0. And for where the object is
not availabe, you fail gracefully and do not give that browser user the
full functionality. With some friendly warning message suggesting an
upgrade.

Quote:
I am sure someone somewhere has a version which does not work, but for
the vast majority it works well.


Probably 90% of people on a MAC don't have support for the HTTPRequest
Object.

The HTTPRequestObject, which AJAX is built on, is the the least
reliable way to get data to the server when compared to other methods
that are available. And especially other methods that are more widely
supported.

Such as? And don't say get and post because we are talking about
"behind the scenes" processing.

Dynamically loading .js files. It is much more widely supported than the
HTTPRequest object is.
What does dynamically fetching a .js file have ANYTHING to do with
background client/server communication?


Reply With Quote
  #17  
Old   
Randy Webb
 
Posts: n/a

Default Re: how to fix this - 03-20-2006 , 12:22 PM



Wojtek Bok said the following on 3/20/2006 10:14 AM:
Quote:
Randy Webb wrote:
Wojtek Bok said the following on 3/16/2006 9:58 AM:

Randy Webb wrote:

Wojtek Bok said the following on 3/15/2006 11:04 AM:

Randy Webb wrote:

Eric said the following on 3/14/2006 4:18 PM:

Wojtek Bok wrote:


snip

Keep a status variable for each link. Use onClick to go to a
function
which changes the state of the variable and changes the CSS for
the link
(thus changing its colour). Use Ajax to send the new state back
to your
server. Finally visit the link.

When refreshing the page, use the state information to set the
starting
values for the variable and CSS.


Ajax? never heard of it. In any case I wouldnt want to install
some new
enivronment just to solve a table cell problem.


AJAX is Asynchronous Javascript and XML. And it is the *worst* way
to get data to the server in a cross-browser environment.

Sure, tell that to Google.

And you think Google is cross-browser?

Um, yes. At least the major players.

It is far from cross-browser when it comes to the scripting code it
uses in it's "AJAX" code.

This is silly. No one is using Netscape 1.0. And for where the object is
not availabe, you fail gracefully and do not give that browser user the
full functionality. With some friendly warning message suggesting an
upgrade.
You say it is silly that the code that Google uses in it's "AJAX" code
is not cross-browser? Well, it's not. You can think it is if you want,
that is your choice.

Quote:
I am sure someone somewhere has a version which does not work, but
for the vast majority it works well.


Probably 90% of people on a MAC don't have support for the HTTPRequest
Object.

The HTTPRequestObject, which AJAX is built on, is the the least
reliable way to get data to the server when compared to other
methods that are available. And especially other methods that are
more widely supported.

Such as? And don't say get and post because we are talking about
"behind the scenes" processing.

Dynamically loading .js files. It is much more widely supported than
the HTTPRequest object is.

What does dynamically fetching a .js file have ANYTHING to do with
background client/server communication?
Hmmm. Let me see. I make a request for a .js file from the server, with
a query appended, the server replies back with a .js file for me to
process. And you ask what it has to do with client/server communication?

I suppose you would ask what hidden IFrames have to do with it also
wouldn't you? Before you ask me that, I will give you a hint. How do you
think they did dynamic data from the client to the server before the
advent of the HTTPRequest Object?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.