快速的Javascript问题

问题描述:

大家好:


我很确定你们中的一个人能够快速发现我脚本中的错误。我是

使用一个小的javascript函数来检索

datagrid列中超链接的文本。


这是我的脚本:


函数parseHyperlinkId(o){

alert(o.text);

alert(o.href);

alert(o.target);

返回true;

}


使用以下内容服务器端代码链接超链接的onClick事件

到javascript


hLink.Attributes.Add(" ; onClick"," return parseHyperlinkId(this);")

o.target返回超链接的目标; o.href返回href; o.text

返回undefined。有谁知道我应该使用哪个属性

检索超链接的文本?


TIA,


-

Joe


VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化>

不要以为......

改变这个:

function parseHyperlinkId(o){

alert(o.text);

alert(o.href);

alert(o.target);

返回true;

}


到此:


函数parseHyperlinkId(url,text){

alert(url);

alert(text);

返回true;

}


并像这样使用onClick:

hLink.Attributes.Add(" onClick"," return parseHyperlinkId(yourURL,yourText);")

-

Curt Christianson

网站: http://www.darkfalz.com

博客: http://blog.darkfalz.com


&quot ;乔"写道:
dont think it is...
change this:
function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

to this:

function parseHyperlinkId(url,text) {
alert(url);
alert(text);
return true;
}

and have the onClick like this:
hLink.Attributes.Add("onClick", "return parseHyperlinkId(yourURL,yourText);")
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Joe" wrote:
大家好:

我相信你们其中一个人可以在我的剧本中快速发现错误。我是使用一个小的javascript函数来检索
datagrid列中超链接的文本。

这是我的脚本:

函数parseHyperlinkId (o){
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

使用以下服务器端代码将超链接的onClick事件链接到javascript

hLink.Attributes.Add (" onClick"," return parseHyperlinkId(this);")

o.target返回超链接的目标; o.href返回href; o.text
返回undefined。有谁知道我应该使用哪个属性来检索超链接的文本?

TIA,

-
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化
Hello All:

I''m sure that one of you can quickly spot the error in my script. I am
using a small javascript function to retrieve the text of a hyperlink in a
datagrid column.

Here is my script:

function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

using the following Server side code to link the hyperlink''s onClick event
to the javascript:

hLink.Attributes.Add("onClick", "return parseHyperlinkId(this);")

o.target returns the hyperlink''s target; o.href returns the href; o.text
returns "undefined." Does anyone know which property I should use to
retrieve the hyperlink''s text?

TIA,

--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation



Curt,


这没有用。如果我无法检索

超链接的文本,我就无法传入您的文本。


如何获取您的文本?请发布代码。


Joe

-

Joe


VB .NET / C#/ ASP.NET / ASP / VB / C ++ / Web和DB开发/ VBA自动化

" Curt_C [MVP]"写道:
Curt,

This doesn''t help. I can''t pass in yourText if I can''t retrieve the
hyperlink''s text.

How do I get yourText? Please post the code.

Joe
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Curt_C [MVP]" wrote:
不要认为它是......
改变这个:
function parseHyperlinkId(o){
alert(o.text);
alert(o.href);
alert(o.target);
返回true;
}

这个:

function parseHyperlinkId(url,text){
alert(url);
alert(text);
return true;
}

像这样的onClick:
hLink.Attributes.Add(" onClick"," return parseHyperlinkId(yourURL,yourText);")

-
Curt Christianson http://www.darkfalz.com
博客: http://blog.darkfalz.com

乔 ;写道:
dont think it is...
change this:
function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

to this:

function parseHyperlinkId(url,text) {
alert(url);
alert(text);
return true;
}

and have the onClick like this:
hLink.Attributes.Add("onClick", "return parseHyperlinkId(yourURL,yourText);")
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Joe" wrote:
大家好:

我相信你们其中一个人可以在我的剧本中快速发现错误。我是使用一个小的javascript函数来检索
datagrid列中超链接的文本。

这是我的脚本:

函数parseHyperlinkId (o){
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

使用以下服务器端代码将超链接的onClick事件链接到javascript

hLink.Attributes.Add (" onClick"," return parseHyperlinkId(this);")

o.target返回超链接的目标; o.href返回href; o.text
返回undefined。有谁知道我应该使用哪个属性来检索超链接的文本?

TIA,

-
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化
Hello All:

I''m sure that one of you can quickly spot the error in my script. I am
using a small javascript function to retrieve the text of a hyperlink in a
datagrid column.

Here is my script:

function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

using the following Server side code to link the hyperlink''s onClick event
to the javascript:

hLink.Attributes.Add("onClick", "return parseHyperlinkId(this);")

o.target returns the hyperlink''s target; o.href returns the href; o.text
returns "undefined." Does anyone know which property I should use to
retrieve the hyperlink''s text?

TIA,

--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation



你在哪里得到你放入文本的价值?你在数据库中读到它们的价值吗?当你把它们写入数据网格时,你可以将它们写入

javascript .....


-

Curt Christianson

网站: http://www.darkfalz.com

博客: http://blog.darkfalz.com


" Joe"写道:
where are you getting the values that you put into the text? Are you reading
them from a DB? When you write them to the datagrid you can write them to the
javascript as well.....

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Joe" wrote:
Curt,

这没有用。如果我无法检索
超链接的文本,我就无法传入您的文本。

如何获取您的文本?请发布代码。

Joe
-
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web和DB开发/ VBA自动化

" Curt_C [MVP]"写道:
Curt,

This doesn''t help. I can''t pass in yourText if I can''t retrieve the
hyperlink''s text.

How do I get yourText? Please post the code.

Joe
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Curt_C [MVP]" wrote:
不要认为它是......
改变这个:
function parseHyperlinkId(o){
alert(o.text);
alert(o.href);
alert(o.target);
返回true;
}

这个:

function parseHyperlinkId(url,text){
alert(url);
alert(text);
return true;
}

像这样的onClick:
hLink.Attributes.Add(" onClick"," return parseHyperlinkId(yourURL,yourText);")

-
Curt Christianson http://www.darkfalz.com
博客: http://blog.darkfalz.com

乔 ;写道:
dont think it is...
change this:
function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

to this:

function parseHyperlinkId(url,text) {
alert(url);
alert(text);
return true;
}

and have the onClick like this:
hLink.Attributes.Add("onClick", "return parseHyperlinkId(yourURL,yourText);")
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Joe" wrote:
大家好:

我相信你们其中一个人可以在我的剧本中快速发现错误。我是使用一个小的javascript函数来检索
datagrid列中超链接的文本。

这是我的脚本:

函数parseHyperlinkId (o){
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

使用以下服务器端代码将超链接的onClick事件链接到javascript

hLink.Attributes.Add (" onClick"," return parseHyperlinkId(this);")

o.target返回超链接的目标; o.href返回href; o.text
返回undefined。有谁知道我应该使用哪个属性来检索超链接的文本?

TIA,

-
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化
Hello All:

I''m sure that one of you can quickly spot the error in my script. I am
using a small javascript function to retrieve the text of a hyperlink in a
datagrid column.

Here is my script:

function parseHyperlinkId(o) {
alert(o.text);
alert(o.href);
alert(o.target);
return true;
}

using the following Server side code to link the hyperlink''s onClick event
to the javascript:

hLink.Attributes.Add("onClick", "return parseHyperlinkId(this);")

o.target returns the hyperlink''s target; o.href returns the href; o.text
returns "undefined." Does anyone know which property I should use to
retrieve the hyperlink''s text?

TIA,

--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation


>