Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Sat Nov 21, 2009 7:13 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ]  Bookmark and Share
Author Message
 Post subject: Javascript browser compatability issues.
PostPosted: Thu Jun 18, 2009 6:26 am 
Offline

Joined: Wed Feb 25, 2009 7:00 am
Posts: 2
Hey I have two small pieces of javascript below right now it only really works in IE. Safari cant handle it neither can chrome among others. I am just wondering why also I have the jquery library and wanted to know if somebody knew how to add a little animation simply. Also right now I just threw it in the body for testing but I am going to put in the head soon. Basically it just resizes a text box and the div containing it. I would also be open to a better solution if anybody knows of one...Thanks.


<script type="text/javascript">
function changeHeight(elemId, h){
var elem = document.getElementById(elemId);
elem.style.height = h;
}
</script>

<script type="text/javascript">
function changeHeight2(elemId, h){
var elem = document.getElementById(elemId);
elem.style.height = h;
}
</script>


<div id='statusinput' style="height:38px;">

<!--<div style="width:60px;float:left;padding-right:5px;"><a href="{$url->url_create('profile',$user->user_info.user_username)}"><img src='{$user->user_photo("./images/nophoto.gif",TRUE)}' class='photo_fr' width='60px' border='0' alt='' /></a></div>-->

<div style="width:442px; float:left; padding:5px 0px 8px 0px;">

<!--<a href="{$url->url_create('profile',$user->user_info.user_username)}">{$user->user_displayname}</a> would like to announce...<br/>-->

<!--input type="textarea" rows='2' onkeypress='return ( (new Event(event)).key=="enter" ? SocialEngine.Viewer.userStatusChangeSubmit() : true );' style="margin: 2px 0px;" size="75" value="" maxlength="100" id="status_new" name="status_new" class="text_small"/-->

<textarea onclick="this.cols=40;this.rows=3; changeHeight('statusinput', 65);"
onblur="this.cols=40;this.rows=1; changeHeight2('statusinput', 38);" type="text"name="status_new" cols="40" rows="1" id="status_new" style="overflow: visible; word-wrap: break-word; word-break: normal; scroll:auto; vertical-align:middle; width:100%" onclick="if($('status_new').value=='{if $owner->user_info.user_status}{$owner->user_info.user_status}{else}What would you like to announce?{/if}')$('status_new').select();" onkeyup="countComment()" onmouseup="countComment()">{if $owner->user_info.user_status}{$owner->user_info.user_status}{else}What would you like to announce?{/if}</textarea>


</div>


Top
 Profile  
 
 Post subject: Re: Javascript browser compatability issues.
PostPosted: Mon Jun 22, 2009 7:40 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
Try to get Firebug, it will let you know the exact cause of the Error.

Also, I assume that you're running under smarty template right?, You should ensure that you place the script tags under "literal" blocks

Hope that helps.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley