Page automatically redirects

  • 1
  • Question
  • Updated 9 years ago
  • Answered
Hi All,

I'm putting a modal box on my site (and it works fine) but when I click on the link to activate the modal box it comes up then redirects to a different page? Hard to explain so try it yourself, here's the address:

http://sitebuilder.yola.com/sites/D428/D5dd/D43d/D288/U8a4986cc1b7df064011b882d34dd5824/8a4986cb221e9c280122313cc40a556e/modal-box.php

Click on Contact and you should see what I mean. Any ideas on how to stop the redirect?

Thanks,
Connor
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
  • lazy

Posted 9 years ago

  • 1
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Connor,
I went to that page, but did not see anything on the page. Did you remove something?
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
No, I can see it. It's when you click on Contact.
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
it made my browser crash
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
hhmm, that's odd. Sorry.
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
its okay :)
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Connor,
Sorry, I didn't click on Contact!

Yes, I see how that redirects, but the redirect never opened up for me, it just sat on a page loading and loading. There is some code in there causing this to happen. Where did you get this, are you able to go back to where you got this and check the code properties or ask someone?

Emmy
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Yeh, that's what happens to me too. It could be something to do with the jotform. I'll check it out.
Photo of Kershnee

Kershnee

  • 2087 Posts
  • 152 Reply Likes
Hi Connor - let me know if you are still having a problem with this and I will take a look.
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Well, I know that it's the jotform that's causing it to redirect to an empty page, now all I need to do is find out why and how to stop it.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Connor.. did you try going to jotform and changing the redirect url?
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Hey Littleus, do you mean like a thank you url? If so I haven't added any.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hey Connor... just wondered if you've been able to figure this out? What exactly is supposed to happen when you click on the contact link? Is it supposed to open up on the same page to your form or to a new page?

I don't believe the problem lies with jotform..but rather with your modal box and perhaps the incorrect way of integrating the two? I'm just taking a guess here and could be way off base. I don't even know what a modal box is. I'm guess I'm just hoping to get ideas percolating on how to resolve this.
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Hey Littleus,

When you click on the contact link a modal box comes up on the page (a modal box is similar to a lightbox) with a contact form. The user fills out the form and submits it and just clicks outside the box and returns to the page they where last on. That way it makes it easier for people to contact because they don't have to leave or load a new page.

Personally I think it is the way jotform works. I can put in anything else in the box and it's fine, but when I put in the jotform it reloads the same page, but this time empty. I haven't looked much at it since though.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hey Connor

I think I got it to work! Take a look and press on "demo". This is your form by the way! Don't know if the form actually works yet though.. but it shows up!

http://rumballchick.yolasite.com/2
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Hey Littleus,

Thank you! this is what I want! So how did you do it..??Did you work your magic?! I see you didn't link to the jotform functions script and instead included it in it, was this it?
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
yes.. I actually opened up the jotform javascript and inserted it outside of the modal box. Then, inside the modal box, where you want your content to show up in the box, I used the css code provided. You may be able to take the script tag and still use it as long as it's outside of the modal box. I'm not sure about that though. I can't remember if I tried it.

Feel free to copy from the page source.