![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Newbie - Help with a string I am just trying to populate a HYPERLINK section and instead and it linking to another window, I want to use javascript to open a window and set a window size. The first one just shows Click here and opens a windows. Perfect, except I want to write some database results. THIS WORKS NavigateUrl="javascript:window.open('123.html',null, 'height=200, width=400, status=yes, toolbar=no, menubar=no, location=no'); void('');"> click here</asp:HyperLink> THIS DOES WORK ALSO-Note that I know have real text populating using EVAL (KEYWORD LABEL). NavigateUrl="javascript:window.open('123.html?catKeywords=',null, 'height=200, width=400, status=yes, toolbar=no, menubar=no, location=no'); void('');"><%# Eval("KeywordLabel") %></asp:HyperLink> THIS DOES NOT WORK. I want to write more variables that are passed into the popup window.<%# Eval("KeywordLabel") %> NavigateUrl="javascript:window.open('popsearch.asp?catKeywords=<%# Eval("KeywordLabel") %>' height=200, width=400, status=yes, toolbar=no, menubar=no, location=no'); void('');"> click here</asp:HyperLink> Any ideas as to what I can do here??? THANK YOU SO MUCH IN ADVANCE!!! *** Sent via Developersdex http://www.developersdex.com *** |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Newbie - Help with a string Joey Martin wrote: Quote: > I am just trying to populate a HYPERLINK section and instead and it > linking to another window, I want to use javascript to open a window > and set a window size. Quote: > THIS DOES NOT WORK. I want to write more variables that are passed > into the popup window.<%# Eval("KeywordLabel") %> > > NavigateUrl="javascript:window.open('popsearch.asp?catKeywords=<%# > Eval("KeywordLabel") %>' height=200, width=400, status=yes, > toolbar=no, menubar=no, location=no'); void('');"> click > here</asp:HyperLink> Hyperlink1.NavigateUrl=StringFormat("javascript:window.open('popsearch.asp?catKeywords={0}',height=200,width=400,status=yes,toolbar=no,menubar=no, location=no);", Server.UrlEncode(KeywordLabel)) (Not tested: parentheses and quotes may not be balanced.) Andrew |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Newbie - Help with a string Andrew Morton wrote: Quote: > Hyperlink1.NavigateUrl=StringFormat("javascript:window.open('popsearch.asp?catKeywords={0}',height=200,width=400,status=yes,toolbar=no,menubar=no, > location=no);", Server.UrlEncode(KeywordLabel)) > > (Not tested: parentheses and quotes may not be balanced.) Andrew |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Newbie - Help with a string Ok, so what I am doing wrong here: <asp:HyperLink ID="LnkPopSearch" runat="server" NavigateUrl='<%# string.Format("javascript:window.open('popsearch.asp?catKeywords={0}',nu ll, 'height=200, width=400, status=yes, toolbar=no, menubar=no, location=no');", Eval("KeywordsList")%>'><%# Eval("KeywordLabel") %></asp:HyperLink> *** Sent via Developersdex http://www.developersdex.com *** |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Newbie - Help with a string Joey Martin wrote: Quote: > Ok, so what I am doing wrong here: > <asp:HyperLink ID="LnkPopSearch" runat="server" > NavigateUrl='<%# > string.Format("javascript:window.open('popsearch.asp?catKeywords={0}',nu > ll, 'height=200, width=400, status=yes, toolbar=no, menubar=no, > location=no');", Eval("KeywordsList")%>'><%# Eval("KeywordLabel") > %></asp:HyperLink> on which SP of which version of the framework you're using, i.e. it is unreliable at best. Also, that isn't the code-behind. http://en.wikipedia.org/wiki/Code-be...e-behind_model It may at first appear to be simpler to put all the logic on the aspx page along with the markup, but you will very quickly find it easier to use the code-behind model. HTH Andrew |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Find a string within a variable string | PowerShell | |||
| problems with $var | select-string -pattern $string -q | PowerShell | |||
| How export-csv deals with string versus string[] | PowerShell | |||
| String PRODUCT_NAME was not found in string table | Vista General | |||