Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Page Data into completion email and HTTP Post
Last Post 04-30-2009 02:13 PM by J. Risse. 11 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ben wieseUser is Offline
going with the flow
going with the flow
Posts:26
Avatar

--
04-16-2009 11:01 AM

    I have a single lead capture form that just collects, name email company and phone.It is referenced across about 100 individual product pages.

    I am collecting the $CurrentURL to get some specific data so we know what the interest is, which is then put into a CRM.

    However, once it gets into the CRM, it has just the URL, /Default.aspx?tabid=56, which is basically useless to the sales person without actually clicking the link. It would also be handy if it were put into the CRM as Widgets 1.0, so when we upgrade we could find all leads that were interested in that product.

    What is the best method to get info from the page into the form? The page title would even provide better data.

    Thanks,

    Ben

    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-17-2009 02:41 AM

    Hi Ben,

    I think the important information here is the tabid. So you can get it as a single number (without the Default.aspx thing) by adding a hidden field to your form. This field must have the short name tabid. And you select the option "Retrieve values from querystring variable for this question" for this field. So this field will always have the tabid-number as its value and you can refer it in the form completion event.

    If you use a form completion event of the type "Dynamic SQL Statement" you can use following statement to get the page name to the tabid:
    SELECT TabName FROM dnn_Tabs WHERE TabID=$(tabid)

    You can also pass the value of the tabid-field to a stored procedure and the procedure gets the page name for you using a similar SQL statement.

    But an very easy and direct way would be:
    You call every page with a parameter DSParam1 and use the "Initial SQL Rendering/Bind" of the form to write the page name directly into a hidden field inside your form.

    Example:
    You call your page with the address: .../default.aspx?tabid=56&DSParam1=56
    (value of DSParam1 equals the value of tabid)

    Now add a hidden field to your form ... lets say that you give it the short name MyPage.
    Now you activate the "Initial SQL Rendering/Bind" in the form settings and add following SQL statement:
    SELECT TabName AS MyPage FROM dnn_Tabs WHERE TabID=$(DSParam1)

    Resullt: the value of the hidden field "MyPage" is the page name.

    Unfortunately, you cannot refer $(tabid) inside the "Initial SQL Rendering/Bind", but with $(DSParam1) it works.

    I hope this is helpful.

    - J.

    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-17-2009 03:44 AM

    I found an alternative using JavaScript:
    You can parse it directly from the HTML code of the page using the value of the breadcrumb on your page. Just have a look in the source code of your page or DNN skin.

    In my page skin the breadcrumb is written in a span-tag with the id dnn_dnnMLBREADCRUMB_lblBreadCrumb.
    Now I just add a (hidden) field with the short name MyPageName and after that I went to the form settings and add a "Initial Javascript" to the "Custom Javascript File" section. A JavaScript like:
    $(MyPageName) = document.getElementById( 'dnn_dnnMLBREADCRUMB_lblBreadCrumb' ).innerHTML.replace(/<(?:.|\s)*?>/g, '').replace('&nbsp;', ' - ')

    The JavaScript gets the HTML code out of the span-tag, strips all HTML-tags and replace the spaces (&nbsp) between the entries by " - ". The result is the complete path in your menu structure with all page title from root down to the current page.

    If you don't have such a span-tag you can add it into your skin yourself.

    - J.

    ben wieseUser is Offline
    going with the flow
    going with the flow
    Posts:26
    Avatar

    --
    04-24-2009 10:32 AM
    J.

    Thanks for the info. It looks like it would work beautifully, but I know zero javascript and the snippet you provide causes nothing to fire when inserted the initial javascript area.

    Any other info.
    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-26-2009 09:31 PM
    Hm ... of course you have to change the Javascript to match your skin.

    If you post the address of your page or another page with the same DotNetNuke skin, I will check if my code snippet can be adapted to match it.
    ben wieseUser is Offline
    going with the flow
    going with the flow
    Posts:26
    Avatar

    --
    04-29-2009 04:26 AM
    J. Thanks again for the info. I really appreciate the assistance.
    I just realized that my testing page was the default DNN skin, without the ID mentioned below in the javascript. I have it set up on real page here:
    http://haag-streit-usa-com.stagemef...?tabid=213

    I also figured I just try to get it into the confirmation email before trying to get it to post to the CRM. The MyPageName in the email is blank, so obviously there is an issue getting the ID value into the form. Either the javascript or another missing tickbox (like retrieve session variables? maybe)

    Here is what I have for the initial Javascript:

    $(MyPageName) = document.getElementById('dnn_dnnBREADCRUMB_lblBreadCrumb').innerHTML.replace(/<(?:.|\s)*?>/g, '').replace(' ', ' - ')

    I was using the ID from the skin, not the above, which is outputted when the page loads (which should be correct).

    Any ideas?
    thanks,
    Ben


    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-29-2009 05:08 AM
    Hi ben,

    I think what you did is right. There is a span-tag with the id 'dnn_dnnBREADCRUMB_lblBreadCrumb' in your skin and your javascript snippet should work with it. Additionally, if I call your test page I don't get a javascript error.

    BUT I had a look inside the HTML source code of your page and I compared with my local test page (where I tried the example before I posted it).

    Normally, the form module adds the initial javascript directly inside the source code of the page. So, if you try to find something after the = of the javascript (i.e. innerHTML.replace) you have to find something in the code. I cannot find it.

    The only reason for that - that I can imagine - could be that you did not click on 'Update Javascript File' after you added the javascript to the initial javascript field.

    Please have a look at the module configuration. If I am right, there will be no javascript snippet in the initial javascript field, because you missed to click the link.
    (I also missed the link as I tried to change the javascripts for the first time.)

    In this case, add the snippet again and click on 'Update Javascript File' before you click on 'Update Settings'. After that the javascript should be inside the source code of the page.

    - J.
    ben wieseUser is Offline
    going with the flow
    going with the flow
    Posts:26
    Avatar

    --
    04-29-2009 05:32 AM
    When I just went in there, that javascript snippet was in there already, but you're right I don't see it injected directly into the page. I do see the DF include file () but not that snippet.

    Any idea why? Could it be the Variable? Should there be any edits to the actual field?

    Thanks,
    Ben
    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-29-2009 11:13 PM
    What version of DF you are using?
    I am using DF 2.7.4.

    While testing to find possible reasons for your problem, I faced another (realy strange) issue. I created a complete new form including only 3 fields.
    - TextBox: Product
    - Text-Box (read only): MyPageBox
    - Hidden Field: MyPageName
    If I now added the script snippet to the initial javascript field, I got an javascript error, because "MyPageName" and "MyPageBox" was undefined.
    After some hours I found the reason for that: it only works if I add a client side script to the Product field.
    I am not a developer of DF, but IMHO its a kind of error.

    I will try to add my test form to betasprings. Perhaps it is a fixed issue (betasprings is running a newer version of DF).
    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-30-2009 01:14 AM
    Hello again,

    I reproduced my test form (with the problem) on betasprings.
    Please have a look at:
    http://www.betasprings.com/Default....?tabid=594

    @Ben:
    The form works fine and gets the page names out of the breadcrumb into two fields. The first field is a visible TextBox "MyPageBox" and the second one is a hidden field "MyPageName". Both fields are filled by the initial javascript of the form. Just login there as host/dnnhost and have a look inside the configuration of the fields and the form. If you have questions, just ask :-)

    @DF Developers:
    Please have also a look at this form. I added a (useless) client side script to the field "Product". The code for it is: $(Product)=$(Product) ... its useless, because it has no effect.
    If you delete this useless script from the field and reload the form, you will get a javascript error "MyPageBox undefined" from the initial javascript of the form. If you add it again to the field, the initial javascript works and writes the breadcrumb-data into the textbox and the hidden field.

    - J.
    ben wieseUser is Offline
    going with the flow
    going with the flow
    Posts:26
    Avatar

    --
    04-30-2009 07:36 AM
    Again, I cannot express the appreciation with assistance.

    I've got it narrowed down to the javascript. It is either not firing, or DF module isn't loading it initially, or there is an issue with my version of DF, which doesn't make sense since these options should be working with our version. Using 02.60.70 by the way.

    Here is my new test form, exactly as you created. Not working: http://www.haag-streit-usa.com/Defa...?tabid=270
    Even included the useless variable match. With nothing.

    Export that form as it is, and imported into the betasprings test site and works like a charm. I even went ahead and added a '1' suffix to my own form fields to make sure I wasn't picking up the set variables by the javascript on the top form.
    http://www.betasprings.com/Dynamic-...fault.aspx

    Is there something else missing? The span ID's are the exact same in both sites, so it's not missing that variable. Could there be something in the skin or module settings not allowing it?

    On the beta springs I could NOT locate the javascript being hardcoded into the page that pulls that variable.

    Thanks,
    Ben

    J. RisseUser is Offline
    going with the flow
    going with the flow
    Posts:32
    Avatar

    --
    04-30-2009 02:13 PM
    OK, Ben

    IMHO the only possible reason is, that your version has a problem or does not support the initial javascript.
    I don't know another reason, if you import a form into betasprings and it works or if you import it into your site and it does not work.

    And now we are at a point where I cannot help you any more, because I am also "only" a customer of Data Springs.
    I think we need some help by Data Springs staff.
    You need help to get the initial javascript function work and I would like to have a statement about the issue I faced.
    I will write a message to the people of Data Springs using the contact form of this page.

    Here (in Germany) on 1st May is holiday (really funny: "The Day of work" is a holiday ;-) ), so I will be back on monday.
    But ... perhaps you already got some more help from the staff, up to monday.

    - J.
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi