- Screen name: nimasdj1
nimasdj1's Profile
15 Posts
70 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- I was googling how to submit contact form without refreshing. I found some plugin. As about success message I guess this is impossible for ajax to know if the message is actually emailed on php part? Right? Or how the code should be to know if this is actually emailed without error?
- I need to fetch a csrf value from a php and post it via a hidden form field using jQuery. My code is here: https://stackoverflow.com/questions/47196897/how-to-have-jquery-to-return-csrf/
What wrong I did there? Any advise is appreciated.I see jQUI has ability for highlight/error state, so why doesn't it have a dismiss ability?
- 13-Sep-2016 05:14 PM
- Forum: Using jQuery UI
My code here https://jsfiddle.net/Twisty/mafnxaxq/
It uses the same dialog for both delete and logout. I want to have separate message for delete and logout. I want to use this html for dialog for all messages:
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span><span id="messageText"></span></p>
with html above, what changes do I need in jsFiddle code above to output different message for logout and delete?
- I have a form with several independent datePicker (not start/end datePicker fields), if I am correct I need to have a separate datePicker js code for each of them, I am wondering if a trick is possible to have one js code for all of those fields with separate date chosen?
- Is it possible to make this category menu expandable? http://jqueryui.com/menu/#categories
I mean wheh clicking on main category then sub-menu appear, clucking again sub-menu disapear, in fact clicking main catrgory expand sub-menu? Possible? How to do it?If I have an img tag with id="blah" and value="x" I know can get the value with:
$('#blah).val();
but if I have that several img tag created in a foreach() loop, how can I get its value as several selectors with the same id is not possible? probably I can use id="blah[]" or I can append an incrementing id like id="blah1", id="blah2", then how can I get the value as I will not know the id? or may be I should just use a .click() event to get the id of clicked element then get its value by id? if yes, how is the code to do so?
I use Button for datepicker and it is working fine. I see the button is placed immediately next to the field, is it possible to add a spacer between field and image? I tried using after field but I see this spacer is still after button, not between them. How is possible to add something between them?
- I edited theme with 8px corner for dialog, tooltip etc. I don't want corner for form fields and prefer to keep them normal. So is there a trick to override corner setting for spinner that it looks without corner?
- 10-Sep-2016 07:03 AM
- Forum: Using jQuery UI
How to tell progressbar to progress how many percent for what?
For example I want to use it for a database installer. If I have 50 tables, so after each table creation I want to make progress the bar 2% so after 50 tables it will be 100% or complete. In example or demo I did not see how to do this?I have a confirmation dialog like this:
- $(function() {
$("#opener").click(function() {
$("#dialog").dialog({
resizable: false,
height: "auto",
width: 400,
modal: true,
buttons: {
"Logout": function()
{
$(this).dialog( "logout.php" ); // ????
},
Cancel: function()
{
$(this).dialog( "close" );
}
}
});
});
});
<img src="cross.png" border="0" alt="Logout" id="opener" /><div id="dialog" title="Logout?"><p><span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span>Are you sure you want to logout?</p></div>
It almost works fine but
1) How can I redirect the page to logout.php if confirmed?
2) On first page load, the page looks weird because of those div tag and the small dialog icon (!) is shown on a wrong place even if the logout icon is not clicked yet. But on first click of logout button, the page shows fine. How to fix it? where is the correct location to place the div tag on the source page to avoid this issue?
- Is there a teach manual or a cookbook for jQuery either online or printed or pdf? I don't mean reference manual but a teach or cook book.
I have a php function string_creator($length) to create a random string. When I want to autofill a form field with that php function via a link, I was using sajax script. It was something like:
- <?php
sajax_init();
sajax_export("string_creator");
sajax_handle_client_request();
?>
<script type="text/javascript">
function string_creator_complete(key) {
if (key == "") {
alert("error");
} else {
document.forms.formName.fieldName.value = key;
}
}
</script>
<input type="text" name="fieldName" value="" />
<a href="javascript:x_string_creator(8, string_creator_complete);">Create a string</a>
When I click "Create a string" link, the "fieldName" field was autofill with the value returned from that php function.
Now I want to move to jQuery from sajax. Is it possible? How?
I want to place a help icon next to each form field, and show tooltip as long as mouse is on the help icon (just on icon not clicking it.) I don't want to show tooltip by hover on form field like the demo.
I have several help icons and by mouse hover on each of them, a separate message should be shown just for that help icon.
reading documentation I am confused between this:
- $( ".selector" ).tooltip({
items: "img[alt]"
});
and this one:
$( function() {
var tooltips = $( "[title]" ).tooltip({
position: {
my: "left top",
at: "right+5 top-5",
collision: "none"
}
});
});
I assume, the first one is for showing alt of all images and I don't want that happens. I guess I can have title tag for help icons and the second function shows them? Is it the correct choice for what I want to do? Or what is the best way to go?
- 06-Sep-2016 05:12 AM
- Forum: Using jQuery UI
Hello,
To Show/Hide textfield base on choice on dropdown list which function should I use? I have no seen this ability on demo site, please give direct link.
Regards,
- «Prev
- Next »
- $( ".selector" ).tooltip({
- <?php
- $(function() {
Moderate user : nimasdj1
© 2013 jQuery Foundation
Sponsored by
and others.