Jump to content

Can Anyone Help Me...


subhomoy

Recommended Posts

I got a script from somewhere on google and found that it contains a "dynamic div" tag i.e see below

<div id="ad<?php echo $fn; ?>"> // [color=#ff0000]This is the place where i'm facing problem...[/color]
<a href="index.php?tp=visit_task&t=<?php echo $fn; ?>&id=<?php echo $fn; ?>" target='_blank' onclick='hideDivTag("ad<?php echo $fn; ?>");'><?php echo $fsitename; ?></a>
 ( You earn:
<?php
if($fpaytype=='points') { ?><?php echo $prise; ?> <?php echo $setupinfo['pointsName']; ?>(s)<?php }
else if($fpaytype=='usd') echo $setupinfo['currency']."$prise";
?> ) <BR /><BR /></div><?php
$clicks++;
}
}
}
?><br />
</div>

 

 

when this code is seen in browser it looks like this

<div id="ad44">
<a href="index.php?tp=visit_task&t=44&id=44" target='_blank' onclick='hideDivTag("ad44");'>Google</a>
 ( You earn:
Rs 0.001000 ) <BR /><BR /></div>			 <div id="ad45"> // [color=#ff0000]This One[/color]
<a href="index.php?tp=visit_task&t=45&id=45" target='_blank' onclick='hideDivTag("ad45");'>156</a>
 ( You earn:
Rs 0.001000 ) <BR /><BR /></div>			 <div id="ad47">// [color=#ff0000]This One[/color]
<a href="index.php?tp=visit_task&t=47&id=47" target='_blank' onclick='hideDivTag("ad47");'>123</a>
 ( You earn:
Rs 0.001000 ) <BR /><BR /></div>			 <div id="ad49"> //[color=#ff0000]This One[/color]
<a href="index.php?tp=visit_task&t=49&id=49" target='_blank' onclick='hideDivTag("ad49");'>789</a>
 ( You earn:
Rs 0.001000 ) <BR /><BR /></div>			 <div id="ad50"> //[color=#ff0000]This One[/color]
<a href="index.php?tp=visit_task&t=50&id=50" target='_blank' onclick='hideDivTag("ad50");'>459</a>
 ( You earn:
Rs 0.001000 ) <BR /><BR /></div><br />
<br />

</div>

 

see that every div tags automatically assigns a number beside it..

 

I want to add new style of this div but can't do that as it is changing randomly whenever new ads is posted and i also can't find the #ad in the .css also.....

 

can anyone help me....

 

Thanks in advance...

Link to comment
https://forums.phpfreaks.com/topic/269888-can-anyone-help-me/
Share on other sites

Then don't use the ID to apply the style properties! Every element must have a unique ID. But, you can give many elements that same class. So, modify the code to apply a class to the divs then define the class in your CSS file.

 

Can you plz give a bit of detail....

Thanks for the reply...

Link to comment
https://forums.phpfreaks.com/topic/269888-can-anyone-help-me/#findComment-1387617
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.