Jump to content

maxwel

Members
  • Posts

    47
  • Joined

  • Last visited

maxwel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The problem is that onclick just call the last fucntion which is button2() also tried to do it like onclick"button1(); button2();" but it do the same thing. been trying lots of ways like onsubmit but still dont work. idk why is that? <script type='text/javascript'> function submitnow(){ function OnButton1() { document.forms['form1'].action='somefile'; document.forms['form1'].target='_blank'; // Open in a new window document.forms['form1'].submit(); // Submit the page return true; } function OnButton2() { document.forms['form1'].action='somefile'; document.forms['form1'].target='_self'; // Open in a new window document.forms['form1'].submit(); // Submit the page return true; } } </script> </head> <body> <input type='hidden' name='submitted' id='submitted' value='1'/> <form enctype="multipart/form-data" method="post" id="form1" name="form1" action="somefile"> <input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value="<?php echo $up_id; ?>"/> <input type="file" name="fileToUpload" size="40" onclick="toggle_visibility('progress_win');" id="file"/><br /> <iframe id="upload_frame" name="upload_frame" frameborder="0" border="0" src="" scrolling="no" scrollbar="no" > </iframe> <br /> <input type="submit" name="Submit" value="Upload Mix" onclick="submitnow()" /><br> can even someone write something similar to do it with ajax instead of js? cuz through searching i found that it seems to be done through ajax than js -simply i need to submit this form to 2 targets for 2 actions but it doesn't work it just submit to last function and ignore the first
  2. its ok, i just going through something too strange trying to use onclick to call 2 javascript functions but it just call the last one, you know why is that?
  3. anything new there? still stuck with that player and google chrome bug,, did ya find anything yet about it? Thanks, Lion
  4. been searching heavily but none :/ idk is it me only who facing such prob?! LS btw i want to learn more javascript and jquery especially through the net is there a good and free/cheap way for doing that? also i got a problem with jplayer thingy u mind posting it up here in that thread? Thanks for all ur help and support, Maxwel
  5. ok solved for sure the 2nd code (for fadeout button) but the first still can\t figure out why that is happening, why it dont move to the right like other css elements?!
  6. thought it was solved but unfortunately it wasnt, it actually now move but to the wrong direction <script> function handleOnFocus(form_element) { var $span = $('.deleteicon span'); $span.css({'right': '10px'}); } function handleOnBlur() { var $span = $('.deleteicon span'); $span.css({'right': '10px'}); } </script> it don't want to go to the right when i clck it just stand still and when i release aka blur it go to the far (i always tried to give opposite numbers but it do the same thing) :/ btw i got a code of jquery that i donno why i doesn't want to work , maybe someone can help and tell why it doesn't since i am totally new with javascript here is the code: </style> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"> </script> <script> $(document).ready(function() { $('input.inputfield').wrap('<span class="deleteicon" />').after($('<span/>').click(function() { $('.inputfield').val('').focus(); })); $('.inputfield').keyup(function() { var $span = $('.deleteicon span'); if($('.inputfield').value.length > 0 && !$span.is(':visible')) { $span.stop().fadeIn(); } else if($('.inputfield').value.length == 0) { $span.stop().fadeOut(); } }); }); </script> the aim of the script above is to fadeout a the clear button when there is no string in the text input and it fadein when there is a string inside, i tried to do everything as well but with no success, seems this javascript has no luck with me and seems its too hard as well Thanks for the help, Maxwel
  7. here is the part of the code which i use to add a clear button for an input field *inside it) but the problem i want when the input field is focused the span clear button move to the right 10px and when its blured it get back to 0px to the right i tried the script with alert and it worked the problem is that the clear button dont move :S idk why <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script> $(document).ready(function() { $('input.deletable').wrap('<span id="clear" class="deleteicon" />').after($('<span/>').click(function() { $(this).prev('input').val('').focus(); })); }); </script> <style> span.deleteicon { position: relative; } span.deleteicon span { position: absolute; display: block; top: 2px; right: 0px; width: 16px; height: 16px; background: url('http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=4') 0 -690px; cursor: pointer; } span.deleteicon input { padding-right: 16px; } </style> <script> var textFieldInFocus; function handleOnFocus(form_element) { var element = document.getElementById('clear'); element.style.right = "10px"; } function handleOnBlur() { var element = document.getElementById('clear'); element.style.right = "0px"; } </script> html: <input size="150" class="deletable" onfocus="handleOnFocus(this)" onblur="handleOnBlur()" type="text" /> any idea how to do it? Thanks alot, Lion
  8. any luck in knowing the problem that cause chrome to do that?!
  9. thanks for the info so much appreciated Any success in knowing why google chrome does that with my player? Thanks in advance, Maxwel
×
×
  • 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.