Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameQueryString Parameter ?QueryString Parameter ?
Previous
 
Next
New Post
2/20/2008 12:37 PM
 

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 3:01 PM
 

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 3:52 PM
 

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 8:16 PM
 

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
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameQueryString Parameter ?QueryString Parameter ?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out