I am sure i just have a syntax error but i have been playing with this for over an hour and still can't figure it out. I have a page that opens a rad window from a javascript function and passes 2 querystring arguments as parameters.
Here is the javascript to open the window:
Here is the code-behind to set the buttons onclick event.
Here is the button that is supposed to launch the window.
When i load the page and click the link i get an exception that querystring format is invalid. When i inspect the querystring the javascript function is appending to the radwindow open call is looks like this:
?ForumID=1%2cNewThread&PostType=undefined
Obviously the javascript function is treating the parameters passed from the onclick event as a single string but i have no idea at this point how to format that onclick so that the javascript function grabs both variables. I found a million examples passing just a single parameter from onclick to a javascript function but can't seem to find any that pass two or more.
Here is the javascript to open the window:
| <script type="text/javascript"> |
| function openEditorWindow(forumID, typeofPost) |
| { |
| var oReadingWnd = radopen("PostEditor.aspx?ForumID=" + forumID + "&PostType=" + typeofPost); |
| oReadingWnd.Center(); |
| } |
| </script> |
Here is the code-behind to set the buttons onclick event.
| lnkNewThread1.Attributes.Add("onclick", "javascript:openEditorWindow('" + this.Request.QueryString["ForumID"] + ", " + PostType.NewThread.ToString() + "')"); |
Here is the button that is supposed to launch the window.
| <asp:HyperLink runat="server" ID="lnkNewThread1" NavigateUrl="#" ImageUrl="~/Images/forum_new_thread.png" |
| Text="Start New Topic"/> |
When i load the page and click the link i get an exception that querystring format is invalid. When i inspect the querystring the javascript function is appending to the radwindow open call is looks like this:
?ForumID=1%2cNewThread&PostType=undefined
Obviously the javascript function is treating the parameters passed from the onclick event as a single string but i have no idea at this point how to format that onclick so that the javascript function grabs both variables. I found a million examples passing just a single parameter from onclick to a javascript function but can't seem to find any that pass two or more.