|
Add this in HTML of chkPresent onclick=”AssignValueOnCheckboxTick(this.checked)"
Now Add this in Java Script
<script type="Javascript">
var cboMonth = document.getElementById('<%= cboMonth.ClientID %>');
var cboYear = document.getElementById('<%= cboYear.ClientID %>');
function AssignValueOnCheckboxTick(ischecked) {
if (ischecked)
{
var cboMonth.style.display = 'block';
cboYear.style.display = 'block';
}
else
{
cboMonth.style.display = 'none';
cboYear.style.display = 'none';
}
}
</script>
|
|
|
|
|
Hi,
I am having difficulties reading the bit value from MySQL and showing it in a checkbox in PHP.
The value is not showing and it's always unchecked!
This is what I am using:
$mysql_command = "CALL sp_get_member_personal_information(:param_member_guid)";
$mysql_query = $mysql_connection->prepare($mysql_command);
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);
$mysql_query->execute();
$mysql_row_count = $mysql_query->rowCount();
if ($mysql_row_count <= 0) { exit(header("Location: home")); }
while ($mysql_row = $mysql_query->fetch())
{
$is_private = (bool)$mysql_row["is_private"];
$hide_contact_details = (bool)$mysql_row["hide_contact_details"];
}
and then:
<input type="checkbox" id="chkPrivateProfile" name="chkPrivateProfile" value="<?php echo $is_private; ?>"> My Profile is Private<br><br>
<input type="checkbox" id="chkHideContactDetails" name="chkHideContactDetails" value="<?php echo $hide_contact_details; ?>"> Hide my contact details<br><br>
I have no problem reading a varchar value but my problem is juts with the bit as it's my first time trying checkbox with php.
Please help...
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I have a database field value, to which i am trying to assign some static values at the metadata level. I want to see this as a dropdown list, with predfined static values. I heard you can achieve this dropdown by defining a foreign key relationship.
is there a way to do this without the table?
==
[DisplayNameAttribute("App Form")]
[UIHint("AppType")]
[Required]
public OptionType AppType { get; set; }</pre>
===
<pre>public enum OptionType
{
CheckBox=1,
radiobutton=2,
freeform=3,
dropdown=4
}
|
|
|
|
|
Hi,
I am building a dynamic questionnaire for our team.
With that said, all information is stored in database, like question text and its answers. Using LINQ to select out information and display on web page using asp.net aspx page.
We also stored the mandatory field in the database. On form submit, I am trying to check if all the mandatory questions were answered.
I am little stumped here - should I create the requiredfieldvalidators dynamically and check this manner? Should I add these validators on button_click or page_load? any other way to check for validation? I guess the challenge for me arises with the fact, i have check this in code behind page.
Thanks a lot!
|
|
|
|
|
Hi,
I have some include files in my PHP project, for example, I am including the meta tag because it's all the same..
I want to ask what's the best extension to use for include files? is it .inc or .php?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
hi,
I am using this to display titles drop down:
then in my insert.php I am reading the value like this:
$member_title = $_POST['cboTitle'];
what if I want to read the text NOT the value?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I am using the following to let the user enter a url:
<input type="url" name="txtLinkURL" autocomplete="off" required style="width: 400px">
I want to know hot to make the box display http:// so user can't remove it?
Note: I am using PHP and HTML
Technology News @ www.JassimRahma.com
|
|
|
|
|
i have a map from google api which is shows a current location
<div id="map" style="height: 480px; overflow: auto;">
</div>
can i save this as image..??
thank you in advance...
|
|
|
|
|
Hi guys, I want to create an ordered list from a multiple select dropdown list, issue is the select option input provided by html only orders values picked linearly, but I want it ordered according to the order I select them at. So I decided to use some JS to do the trick but wsnt able to hack. Here's the code. Help out please!!
<script language='javascript'>
function showselection()
{
var frm = document.testing
var opt = frm.testsel
var numofoptions = opt.length
var selValue = new Array
var j = 0
for (i=0; i<numofoptions; i++)
{
if (opt[i].selected === true)
{
selValue[j] = opt[i].value
j++
}
}
selValue = selValue.join("+")
document.getElementById("txtEditions").innerHTML = selValue
}
</script>
<form method=POST name='testing'>
<select name='testsel' multiple onchange='showselection()'>
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
</select>
<textarea id="txtEditions"></textarea>
</form>
|
|
|
|
|
[edit] for the below to work in all browsers you should set teh ID of your select box to testsel - using the name property is all but redundant these days.
You do knwo there is a Javascript discussion forum? However, try this js:
function showselection() {
var s = document.getElementById("testsel");
var x = s.options[s.selectedIndex].value;
document.getElementById("txtEditions").value += x + '\n';
}
modified 22-Oct-13 12:22pm.
|
|
|
|
|
I have numerous interactive coloring pages that were created in Adobe Flash that need to be converted to HTML5. Because they use an older actionscript, Google Swiffy doesn't do a good job converting them.
I thought it might be easier to just start from scratch with my drawings. Is anyone aware of a free HTML5 solution that could work with the right graphic? I'd even be open to paying someone to code this for me.
It should work like this:
- Start with a line drawing (can be vector format, gif or png)
- Have a selection of about 40-50 colors (can be crayons or color dots)
- Pick a color and then click on the image to fill the space
- A white crayon serves as an eraser
- Option to print just the graphic to color offline
- Option to print finished coloring page in color
Thanks!
|
|
|
|
|
I have a Self referential Table. this is it's Model
<pre lang="c#">public partial class Title
{
public Title()
{
this.TitleChild = new HashSet<Title>();
}
public int Id { get; set; }
public string TitleText { get; set; }
public int? TitleId { get; set; }
public virtual ICollection<Title> TitleChild { get; set; }
public virtual Title TitleParent { get; set; }
}
when i Create a Controller and the View is made by scaffolding , there isn't anything for parent Field? I Have one field in page which is TitleText, how can i have the page for TitleText and its parent?
|
|
|
|
|
Hi,
I am using a datepicker. Everything is fine so far except the month in the datepicker. It's just showing the current month and not allowing user to select other months?
can anyone help please..
here is the code:
<input type="text" id="dateBirthday" name="dateBirthday" value="<?php echo $member_date_of_birth; ?>" autocomplete="off" readonly required>
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I would like to ask what's the best way to send emails through php webservices?
I have different websites in php and I want one centralized emailing procedures for all that's why I thought of web services... but I never used web services in php...
please advise....
Technology News @ www.JassimRahma.com
|
|
|
|
|
Sir;
I don't think web is a good choice for periodic tasks like messaging or emailing. you can add records in the database for these messages from your web services. Then another service process (daemon in Linux) checks for new records and send them. In this way you would keep track for your emails and you can resend them anytime. First of all you wont waste web server resources in sending emails.
Help people,so poeple can help you.
|
|
|
|
|
well, that's what I am planning.. I mean first save it in database then email but I thought to do it all through web services..
so your advise is not to do it that way?
I'll save it to the database via web services first
then how will I email it? is it through scheduled task?
I am using the application on shared host and I will use it from web as well as windows application..
Technology News @ www.JassimRahma.com
|
|
|
|
|
in this case you can either ask your host provider to install the service process you developed. Or you can create one additional web application that caches a dummy object (current time for example). On the expiry of this object you run the code of the job of emailing and cache another object with the same expiry time and the same handler.
Help people,so poeple can help you.
|
|
|
|
|
Hi,
I would like to ask which title is better for SEO and for sitelinks:
<title>Features</title>
or
<title>Features - Microsoft</title>
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Very nice, teaching them how to fish instead of giving the fish away.....
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
I think the Unparalleled title is best for SE
|
|
|
|
|
Hi,
I have a drop down in my php. I want to set the first item as NULL then determine in my PHP if it's null or not.
If NULL then pass a NULL through the PDO, otherwise save the integer alue.
something like this:
<option value="<?php echo null; ?>">[Select..]</option>
if ($member_title != NULL) { $mysql_query->bindParam(':param_member_title', $member_title, PDO::PARAM_INT);}
else {$mysql_query->bindParam(':param_member_title', NULL, PDO::PARAM_NULL);}
can anyone help please... Thanks...
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi team,
I am trying to implement fingerprint recognition code for online voting using php code,can you please tell me how to how to convert the thumb impression to hexacode number,so that i can use in project.
|
|
|
|
|
Online voting, meaning over the internet? Silly question, but how do people scan their finger print from a typical monitor?
I believe there are products that will scan finger prints and have SDKs.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Agree
|
|
|
|