Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Iframe Module [...  QueryString Parameter ?
Previous Previous
 
Next Next
New Post 2/20/2008 8:37 AM
User is offline Paul Hermans
31 posts
www.benemtech.com
10th Ranked


QueryString Parameter ? 

Hi all,

I am fairly new to DNN, so bear with me if this question is silly...What I want to do is display a textbox with a button next to it....when the user clicks the button, take the text from the textbox and attach it to the url of the IFRAME as a query parameter with a particular name. So if the url of an IFRAME is www.somepage.com   and the user enters "some data" in the textbox and clicks submit, I want to change the url of the IFRAME to be www.somepage.com?name=some%20data  

Is this done via the url parameters in the IFRAME or will I have to create a custom module?

Thanks

Paul

 
New Post 2/20/2008 11:01 AM
User is offline Vitaly Kozadayev
671 posts
www.continure.com
7th Ranked






Re: QueryString Parameter ? 

IFrame handles QueryString parameters that had been passed to the page where module is located. So, if you go to http://ursite.com/somepage.aspx?name=some%20value, and that page has IFrame module installed on it, and IFrame module is expecting a parameter called "name" in a QueryString, then it will create an IFRAME tag with SRC url ending with name=some%20value

Anything beoynd that point you'll have to create yourself.

If you need help with that, please provide more info.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post 2/20/2008 11:52 AM
User is offline Paul Hermans
31 posts
www.benemtech.com
10th Ranked


Re: QueryString Parameter ? 

Hi Vitaly,

I am not sure I completely understood your example...so I will be more specific and use the actual urls that I am trying to use.

The purpose in the IFrame I'm trying to make was originally to display the boundary of the little league so that people could check if their house was within our boundary before registering.  To do that I made a KML file, and then used live maps to display. At this point the IFrame worked great...Aside from the size properties etc, the only relevant one is the URL that the IFrame is supposed to display...it is: http://maps.live.com/default.aspx?v=2&cp=39.955149~-75.663357&style=r&lvl=12&tilt=-90&dir=0&alt=-1000&cid=85F0C8C6775871DD!116&encType=1

All of the parameters essentially control where the map zooms in and how much etc.

Next I was asked to provide a simple way for the user to keyin their address, and have a pushpin located on it so they could more easily check if they were in the boundary.  To do this, I learned that all I have to do is add another parameter to the end of the query string that tells Virtual Earth what my address is and it takes care of the rest.

So, if we assume that I want to show a pushpin for the following address 1 W Street Rd, West Chester, PA 19382

Then I could modify the SRC tag of the Iframe to be:

 http://maps.live.com/default.aspx?v=2&cp=39.955149~-75.663357&style=r&lvl=12&tilt=-90&dir=0&alt=-1000&cid=85F0C8C6775871DD!116&encType=1&sp=adr.1%20W%20Street%20Rd%2cWest%20Chester%2cPA%19382

I would quickly see that the address is outside of my boundary.

So, I copied the code from the IFrame module and thought I could simply change the IFrame.ascx page to show a textbox for street, city, state, zip and a button for the user to submit.  Then in the codebehind I could do something like the following:

Protected

Sub btnAddress_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAddress.ClickDim paramVal As String

paramVal =

"&sp=adr." & txtStreet.Text & "%2c" & txtCity.Text & "%2c" & txtState.Text & "%2c" & txtZip.Text

htmIFrame.Attributes("src") = htmIFrame.Attributes(

"src") & paramVal

End Sub

 

BUT, that doesn't seem to work b/c of something with encoding/decoding of the string. I haven't quite learned how to do this better yet.

Also, it doesn't really take into account if the "sp=..." param already exists on the query string. 

Any suggestions on how better to do this?

Thanks in advance

 

Paul Hermans

 

I thought I might be able to do this using one of the query string parameter types in the IFRame module, but so far haven't found any example of how to do what I want.

I thought I could just do it in code behind of the button, but

 

 

 
New Post 2/20/2008 4:16 PM
User is offline Vitaly Kozadayev
671 posts
www.continure.com
7th Ranked






Re: QueryString Parameter ? 

Got it.

Let me play with it for a day and I'll let you know what's going on.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Iframe Module [...  QueryString Parameter ?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com
Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP