<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
hi
in my project that is developed using palm technology ie webos ,in this application form is not get scrolling option automatically,so i have to apply scrollbar manually.with this user can feel userfriendly.could some help me in this isue hoe to apply scrolling manually.
thanking u
Hello All,
How can I escape a ' (single quote) in JS. This is where I'm trying to use it.
<input type='text' id='abc' value='hel'lo'>
result for the above code is "hel" populated in the text box. I tried to replace ' with \' but this what I'm getting.
<input type='text' id='abc' value='hel\'lo'>
result for the above code is "hel\" populated in the text box.
How can I successfully escape the single quotes.
i am trying to display an image by using the tag using the following code:
<img id="img" src="C:\images.jpg" />
but there is no image displayed.i am sure that the image exist and i have already tried putting // instead of one / , but it is still not working.
any help?
hello,
my main question is as follows: how to show only the first subchild of a ul or li upon clicking the enclosing parent.
eg:
<ul> Grandparent
<li> Child1 <li> Grandchild11</li></li>
<li> Child2 <li>GrandChild21</li><li>grandchild22</li></li>
</ul>
so, for example
I would like something to the effect of
<script>
$('ul').click(function(){
$('ul').children('first li').toggle()
});
$('li').click(function(){
$('li').children('first li').toggle()
});
</script>
meaning: when i click ul, i only see the first child node (child1 and child2 will be shown, but not the grandchildren). when i click child1 or child2 i see the respective grandchild.
grandchild is not shown upon clicking grandparent, only upon clicking child1 or child2.
i know i am reinventing the wheel of some pre-coded solution, but any help would be largely appreciated!
My company has purchased a third-party package with a built-in customer facing web portal, and I'm being tasked with integrating it into our site. Unfortunately, the web portal does not look great, and we have absolutely no control over how it looks (other than asking the vendor for changes - $$). In order to make it look somewhat like the rest of our site, I've stuck it in an iFrame (I'm not thrilled about this either) to put our logo and top navigation on it.
Please note, I am not attempting to manipulate the iframed page in any way.
Firefox handles this just fine, but in IE7 and IE8, not all of the CSS is being applied properly when the application's pages are displayed in the iFrame. Specifically, it should be applying a font-family of Arial to all TDs, but some text inside TDs are not being displayed as Arial.
Any ideas as to what is going on? This only happens when the pages are viewed inside the iFrame. Outside the iFrame, the CSS is applied as it should be. I'm guessing we're going to have to get our vendor to make some changes, but I'd love to know why the iFrame is impacting the page like this.
Thanks!
Is it possible to take a screen capture of a particular area of a web-page from the web-page's own ASP.NET code?
I need to display 6 images that are stacked on top of one another using CSS, and I'd like to offer the user the ability to right-click save-as if possible by stacking the screen capture on top top of the original image stack.
Any thoughts?
Thanks
I have a form which have a file input;
<%form_tag '/dboss/newsbsresult' , :remote=>true do %>
<input type="file" id="examsendbutton" name="txtsbs"/><br/>
<input type="submit" value="Gonder">
<%end%>
Here i want the user to select a txt file which i try to parse and use at server, but i cannot catch the uploaded file with this code,
def newsbsresult
@u = params[:txtsbs] #Or params[:txtsbs].to_s
p @u
end
What is the true way of achieving this?
I want to redirect from a old url which still appears in the google search to the new one. the old url is this:
http://www.marionettecolla.org/file%20_mostra_milano/mostra_marionette-milano.htm
and I want to redirect it to the home page:
http://www.marionettecolla.org/
I used this in my .htaccess:
Redirect http://marionettecolla.org/file\ _mostra_milano/mostra_marionette-milano.htm http://marionettecolla.org/
but I am getting Error 500... Does anybody know how to solve this problem?
I want to display a table from database in phpMyAdmin by putting the following conditions that in every different options in drop down menu it displays different table from database by pressing the button of search. But it is not doing so.
<p class="h2">Quick Search</p>
<div class="sb2_opts">
<p></p>
<form method="post" action="" >
<p>Enter your source and destination.</p>
<p>From:</p>
<select name="from">
<option value="Islamabad">Islamabad</option>
<option value="Lahore">Lahore</option>
<option value="murree">Murree</option>
<option value="Muzaffarabad">Muzaffarabad</option>
</select>
<p>To:</p>
<select name="To">
<option value="Islamabad">Islamabad</option>
<option value="Lahore">Lahore</option>
<option value="murree">Murree</option>
<option value="Muzaffarabad">Muzaffarabad</option>
</select>
<input type="submit" value="search" />
</form>
</form>
</table>
<?php
$con=mysqli_connect("localhost","root","","test");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if(isset($_POST['from']) and isset($_POST['To'])) {
$from = $_POST['from'] ;
$to = $_POST['To'] ;
$table = array($from, $to);
switch ($table) {
case array ("Islamabad", "Lahore") :
$result = mysqli_query($con,"SELECT * FROM flights");
echo "</flights>"; //table name is flights
break;
case array ("Islamabad", "Murree") :
$result = mysqli_query($con,"SELECT * FROM isb to murree");
echo "</isb to murree>"; //table name isb to murree
;
break;
case array ("Islamabad", "Muzaffarabad") :
$result = mysqli_query($con,"SELECT * FROM isb to muzz");
echo "</isb to muzz>";
break;
//.....
//......
default:
echo "Your choice is nor valid !!";
}
}
mysqli_close($con);
?>
I know this is simple as cake but I've been using ASP.NET controls for way too long. I assume you have to do this via javascript with a regular XHTML input tag?
I'm working on an application where dates are passed as yyyy-mm-dd but displayed to the client as mm-dd-yyyy (US based client).
I'm using a jQuery datepicker for selecting from/to dates in a report and would like to show the dates to the client as mm-dd-yyyy but when the form is submitted, submit as yyyy-mm-dd.
Is it possible to display one value in a textinput textbox and have another submitted without needing to hook into onSubmit?
I've come up with the following alternatives:
Hide the text input for the from and to fields, create dummy fields and make use of the following jQuery date picker functions: altField and altFormat to display the value to the client in their preferred way and deal only with the submitted values which are set through the alt functions.
Have an onSubmit javascript call to change the dates from mm-dd-yyyy to dd-mm-yyyy and also change the value=" to change the date to the client's preferred format.
Rewrite the app to handle all dates in mm-dd-yyyy and hope the client never has non-US customers that would like their dates in a specific format.
Change all dates to dd-Mon-YYYY e.g. 26-May-2010 as all of our client's customers are guaranteed to be English only.
For example I have:
<div id ="test">[the content here]</div>
The content within the div tags will appear after I called the id of div using ajax.
This is the code:
function dinamic(add)
{
var kode = add.value;
if (!kode) return;
xmlhttp2.open('get', '../template/get_id.php?kode='+kode, true);
xmlhttp2.onreadystatechange = function() {
if ((xmlhttp2.readyState == 4) && (xmlhttp2.status == 200))
{
var add = document.getElementById("test");
add.innerHTML = xmlhttp2.responseText;
}
return false;
}
xmlhttp2.send(null);
}
So it will appear <div id="test">A</div>
I'd like to put the content of div - A into mysql query.
$test = $_GET['test'];
$query = "select * from example where category='$test'";
I've tried to make variable $test of the div id to get the content but result of the query in category is none.
I tried again, I put the div in to the query
$query = "select * from example where category='<div id=\"test\">A</div>'";
Yes, It works. But when I did query on navicat, no results I got because there's spaces between A that is <div> and </div>.
How to remove/hide the div tags only so its only appear the content?
> $query = "select * from example where category='A'"; <
Edit:
If I echo the query on firefox browser will say "$query = "select * from example where category='[space]A[space]'";"
And look at the bug(I use firebug), it will say "$query = "select * from example where category='<div id="test">A</div>'";"
So my guessing why can't get result after query on navicat is there's spaces between A([space]A[space]), just have no idea how to remove/hide the div tags, I want to get this result only "$query = "select * from example where category='A'";"
Thanks.
I have to modify an existing web search page.
There is a page, where all the search filters are (form with name "searchform").
When the search button is pressed, results are shown in new window.
Because the search takes up to 30 seconds, and while searching the window stays blank, I have to add a label "Searching. Please wait..." at the new created window with the results.
So the search window is created, and I set it's location to a frameset. First frame will show the label, and the second will show the results. But i can't manage to update the second frame with the results.
Result windows is created as:
var left = (screen.width/2) - 750/2;
var top = (screen.height/2) - 600/2-100;
var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=750,height=600,left='+left+',top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open('ex_search_frameset.php', 'results_exi', styleStr);
msgWindow.focus();
Than the search is requested:
f = document.searchform;
f.action = 'ex_search_results.php';
f.target = msgWindow.document.res_frame; // here i can't figure out what the target
must be
// or how to post the params from "f" to the second frame "res_frame"
f.submit();
Here is the frameset.
<frameset rows="200,*" border="1" name="SearchFrame">
<frame name="wait_frame" src="ex_search_wait.php" target="right">
<frame name="res_frame" src="ex_search_results.php" target="_self">
</frameset>
Any idea how to do this?
I have two divs, one inside another. The outter one is called #wrapper, while the inner one is called #pad.
Now #pad allows user input, and I have a javascript (jQuery) function that changes the content of #pad based on what the user input is. Sometimes, because of this function, #pad's content will cause the div to become more elongated than before. Now obviously I would wish for #wrapper to grow longer as well to accommodate this change in #pad's length. However, this does not occur.
#wrapper
{
clear:both;
padding-top:0.5em;
/*padding-left:50px;*/
height: 100%;
background-color: rgba(255,255,255,0.4);
-moz-border-radius: 20px 20px 0px 0px;
-webkit-border-radius: 20px 20px 0px 0px;
border-radius: 20px 20px 0px 0px;
}
#pad
{
margin-top: 25px;
-moz-border-radius: 5px;
border: solid 1px #DDD;
margin-left:25px;
padding-left:25px;
margin-right:25px;
padding-right:25px;
margin-bottom:2em;
}
This is the javascript function:
function preview()
{
var id1=$("#input1").val();
var id2=$("#input2").val();
var id3=$("#input3").val();
var id4=$("#input4").val();
var id5=$("#input5").val();
if(id1!= null && id1!="")
{
if( $("#preview1").attr("src")!=id1)
{
$("#preview1").attr("src",id1);
$("#preview1").fadeIn("slow");
}
}
else
{
$("#preview1").attr("src","");
$("#preview1").fadeOut("slow");
}
if(id2!= null && id2!="")
{
if( $("#preview2").attr("src")!=id2)
{
$("#preview2").attr("src",id2);
$("#preview2").fadeIn("slow");
}
}
else
{
$("#preview2").attr("src","");
$("#preview2").fadeOut("slow");
}
if(id3!= null && id3!="")
{
if( $("#preview3").attr("src")!=id3)
{
$("#preview3").attr("src",id3);
$("#preview3").fadeIn("slow");
}
}
else
{
$("#preview3").attr("src","");
$("#preview3").fadeOut("slow");
}
if(id4!= null && id4!="")
{
if( $("#preview4").attr("src")!=id4)
{
$("#preview4").attr("src",id4);
$("#preview4").fadeIn("slow");
}
}
else
{
$("#preview4").attr("src","");
$("#preview4").fadeOut("slow");
}
if(id5!= null && id5!="")
{
if( $("#preview5").attr("src")!=id5)
{
$("#preview5").attr("src",id5);
$("#preview5").fadeIn("slow");
}
}
else
{
$("#preview5").attr("src","");
$("#preview5").fadeOut("slow");
}
setTimeout("preview()",1000);
$("#wrapper").attr("height",$(document).attr("height"));
}
http://surveys.mylifeisberkeley.com/
Here's the issue. I have a database column called pymnt_meth_pref, which contains a comma separated string of payment methods chosen from a multiselect form.
<td>Payment Methods Used:<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Cash">I can pay with cash.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Check">I can pay by check.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Credit Card">I can pay by credit card.<br />
<input type="checkbox" name="pyment_meth_pref[]" value="Paypal">I can pay with Paypal.<br /> </td>
This array is posted to a variable and turned into a comma separated string
if (isset($_POST['pyment_meth_pref']))
$pymntmethpref = implode(", ", $_POST['pyment_meth_pref']);
if (isset($_POST['pyment_meth_acc']))
$pymntmethacc = implode(", ", $_POST['pyment_meth_acc']);
This is then inserted into the database as a comma separated string.
What I would like to do, is take this string and apply the values to the original form when the user goes back to the form as 'pre-selected' checkboxes, indicated that the user has already selected those values previously, and keeping those values in the database if they choose to edit any other information in the form.
I'm assuming this would need to be done with javascript but if there is a way to do it with PHP I'd rather do it that way.
I would like to take what text is in my p tag and make that the p tags parent (div) that ID. I would also like to add a _ for any spaces in the p tag.
Example:
<div class="circle"><p>Apple</p></div>
<div class="circle"><p>Banana</p></div>
<div class="circle"><p>Carrot Juice</p></div>
to
<div id="Apple" class="circle"><p>Apple</p></div>
<div id="Banana" class="circle"><p>Banana</p></div>
<div id="Carrot_Juice" class="circle"><p>Carrot Juice</p></div>
I couldn't find a similar question, that's why here it is:
Whats the best way to hide or encrypt an email link in a website, so that a crawler can't read it, but the user can nevertheless click it?
I don't want to conufse the users by typing the email like this: john (at) mail.com or similar ways. (and i think this kind of links can nevertheless read by crawlers?)
I also tried things like that:
<script>// <![CDATA[eval(unescape('%76%61%72%20%73%3D%27%61%6D%6C%69%6F%74%72%3A%62%61%40%65%64%61%6E%6F%6C%2E%69%27%3B%76%61%72%20%72%3D%27%27%3B%66%6F%72%28%76%61%72%20%69%3D%30%3B%69%3C%73%2E%6C%65%6E%67%74%68%3B%69%2B%2B%2C%69%2B%2B%29%7B%72%3D%72%2B%73%2E%73%75%62%73%74%72%69%6E%67%28%69%2B%31%2C%69%2B%32%29%2B%73%2E%73%75%62%73%74%72%69%6E%67%28%69%2C%69%2B%31%29%7D%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%61%20%68%72%65%66%3D%22%27%2B%72%2B%27%22%3E%4F%62%65%72%70%61%72%6C%65%69%74%65%72%3C%2F%61%3E%27%29%3B'))]]></script>
but i heard this can also be read by crawler and it isn't really good practices
are ther any common approaches?
I have a textbox used to enter the text by user, which guide-text which disappears when user starts to write. But when I use a dropdown & select a text from it, & this text is automatically entered in the textbox, the guide-text is not fading away.
Events I am using to fade the guide-text :
$('input, textarea').live('keydown', toggleLabel);
$('input, textarea').live('paste', toggleLabel);
On change of dropdown :
$('.ui-discussion-text').change(function () {
var oldText = $('.ui-discussion-input textarea').val();
$('.ui-discussion-input textarea').val(oldText + " " + $(this).val());
});
Please help.
Recently i learned that i can display images in a web page without referencing an image URL as follows :
<img class="disclosure" img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oIGRQbOY8MjgMAAABVSURBVBjTfc6xDcAwCETRM0rt5nbA+49j70DDAqSLsGXyJQqkVxxwNOeMiEA+waW1VuT/inrvG7wikht8UETy2ygVMjO4O8YYTf6AqrZyUwYlygAAXo+QLmeF4c4uAAAAAElFTkSuQmCC">
I had another small bmp image that i wanted to display, so i opened it in vim and the img source looke like:
When i paste this code where it needs to be pasted i only get "BM?"
How to i convert/paste this code properly to be used as an image source?