Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 13:23:44 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: html execution in javascript? -  (Read 1422 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Snake X
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Yesterday at 11:49:02
Date Registered: 18 March, 2010, 02:48:47
Posts: 806


Topic starter
Total Post Ratings: +25

View Profile
« on: 05 August, 2011, 14:06:04 »
0

You could use php...

1
2
3
4
5
6
7
8
9
10
<html>
<body>
<?php if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "chrome") > -1) { ?>
<!-- Chrome html here -->
<?php } else { ?>
<!-- Display error! -->
<?php ?>
</body>
</html

I have used your suggestion and made this:

1
2
3
4
5
6
7

<?php if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "chrome") > -1) { ?>
<!-- <p><font face="arial" size="24"><b>IM USING CHROME!!! </b></font></p> -->
<?php } else { ?>
<!-- <p>get chrome!</p> -->
<?php ?>

however this is displayed on both chrome and firefox: -1) { ?>

edit: if i take out the <!-- and --> on both, it displays all 3:

-1) { ?>
IM GETTING CHROME
get chrome!
« Last Edit: 05 August, 2011, 14:10:52 by Snake X » Logged

There's a Zombie for that™
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 1.727 seconds with 32 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.