Unstoppable Domains

Maybe Iframe?

Spaceship Spaceship
Watch

combs84

Established Member
Impact
23
I'm having a little trouble here.

Background information being that this is how a functional page on the site looks: YayTickets.com - Cleveland Cavaliers NBA Tickets

Now, the Ticket listings on the right are a code that is this:
Code:
<td width="67%" valign="top"><div style='float:left;width:500px; padding-bottom:15px;'>
               <script language="JavaScript" src="http://www.tickettransaction.com/?brokerid=1448&sitenumber=1&plugin=event_results&event=Cleveland Cavaliers&sortcol=&sortord=" type="text/javascript">
		      </script>
              </td>
         </tr>
       </table>

Now, you can see that is functioning properly because there are listings available. But when the Listings go away, it gets automatically directed to a None available page. You can view that by going here: YayTickets.com - Detroit Pistons NBA Tickets

It just redirects. And in a perfect world, I would just like for it to Say No Listings Available under there on the right side instead of redirecting. The only way I can think to do this would be an Iframe, and even then i'm not sure of the proper code to put there...and it would end up looking really tacky.

ANY IDEAS? I'd greatly appreciate your help!:ghost:
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Somebody lend a thought please? :(
 
0
•••
Oh, I see what you're talking about now. Your site is loading a little slow; might explain the lack of responses.

I looked into your site and the ticket listing vendor's Javascript. Unfortunately they mix-and-match PHP code in their back-end on their server and Javascript functionalities. What they REALLY should do is use the PHP only for server-side processing (obtaining ticket lists, etc), and use the Javascript to display the data correctly. What they are doing is using the PHP to dictate which Javascript snippets entirely are executed on your site. Generally I, and the people I work with (we build a Javascript-based product that people put on their websites) consider this bad practice.

The reason I say this is because my original idea would be to just look at the JS file you're including and find the offending line (that causes a redirect), then make your own identitcal JS file without that line -- unfortunately they don't make that very feasible. I think now it requires getting a little sneaky.

Look at the included JS file on that second page you linked to. The source of that is:

Code:
document.write('<!--METRO-WEB-11-->');
document.write('<script type="text/javascript" language="javascript">'+
'						location.replace(\'ResultsEmpty.php?title=Event%3a+Detroit+Pistons&\'+window.location.search.substring(1));</'+'script>');
document.write(''+
' ');

Bingo. You need to somehow intercept this. The best way is to use PHP or Javascript to inspect the included code for "location.replace" and filter out lines like that or somehow "cancel" the request. I think the best thing to do is cancel the request (the former would be used for security rather than cosmetic reasons).

With Javascript, implement a "hook" on your page that detects page re-directions. When one is detected, simply cancel it (return false usually). You can find out how to do this via Google.
 
0
•••
Thanks for your reply. Is the site still going slow for you? I've never had that problem so just curious if there is a problem with it.

I like your idea of canceling a redirect though! I'm a newb when it comes to code though, any idea what i should search on google to find something like this? I searched a lil bit and nothing remotely close came up, hmm.
 
0
•••
I did some Googling for things like "javascript confirm leaving page" and stuff and some various ideas and forum posts came up. Just keep Googling and you'll find something.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back