473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What's wrong with this simple script ? I've been really fighting this one !

I have a combo named cboType. Depending on its index, I need to build
a string to assign to the NavigateUrl of a hyperlink (the path to a
doc in the 'previews' subfolder).

I get a "The server tag is not well formed' error.....

NavigateUrl=
'<%#"javascript:
var index =
document.getElementById('cboType.ClientID').select edIndex;
return '~/Previews/' + cboType.options[index].text + '.doc';
"%>'

I have tried this in many ways..... the same problem.... :-(((((

Thanks a lot !
Alex

Feb 8 '07 #1
2 1096
"Alex" <cu*************@yahoo.comwrote in news:1170971021.589193.213000
@a75g2000cwd.googlegroups.com:
I have a combo named cboType. Depending on its index, I need to build
a string to assign to the NavigateUrl of a hyperlink (the path to a
doc in the 'previews' subfolder).

I get a "The server tag is not well formed' error.....

NavigateUrl=
'<%#"javascript:
var index =
document.getElementById('cboType.ClientID').select edIndex;
return '~/Previews/' + cboType.options[index].text + '.doc';
"%>'
The error message indicates that the server is trying to evaluate the JS
inside the <%#...%>, but that isn't what you want. You want the JS to
show up on the client's computer in the web page, to evaluate after the
user has selected one of cboType's options.
Feb 9 '07 #2
On Feb 8, 10:12 pm, Jim Land <RrrrFfffTttt(NO)@(SPAM)hotmail.com>
wrote:
"Alex" <cuca_macaii2...@yahoo.comwrote in news:1170971021.589193.213000
@a75g2000cwd.googlegroups.com:
I have a combo named cboType. Depending on its index, I need to build
a string to assign to the NavigateUrl of a hyperlink (the path to a
doc in the 'previews' subfolder).
I get a "The server tag is not well formed' error.....
NavigateUrl=
'<%#"javascript:
var index =
document.getElementById('cboType.ClientID').select edIndex;
return '~/Previews/' + cboType.options[index].text + '.doc';
"%>'

The error message indicates that the server is trying to evaluate the JS
inside the <%#...%>, but that isn't what you want. You want the JS to
show up on the client's computer in the web page, to evaluate after the
user has selected one of cboType's options.
Thanks for answering, Jim. I understand your point.... but how do I go
about doing that ? I'm looking at this code, and to me(because of my
very limited knowledge) it looks alright....

Alex.

Feb 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Martin Maney | last post by:
In my copious spare time I've been dabbling at getting a computerized version of a board game working. After deciding that tk just made me want to vomit, and wx was like swimming through...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
2
by: Craig | last post by:
I'm a C# forms programmer, don't know alot about web programming, and I've been thrown on a web project and it seems like a mess, I wanted some direction. The current web site is hosted on unix...
2
by: Tarik Monem | last post by:
OK! I've gone through a few tutorials and I cannot understand what I'm doing wrong casting_registration.php <table> <tr> <td> <form enctype="multipart/form-data" action="thankyou.php"...
16
by: SirG | last post by:
I'm looking for an explanation of why one piece of code works and another does not. I have to warn you that this is the first piece of Javascript I've ever written, so if there is a better way or a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.