|
Sorry for the ambiguity. Windows has a ContentAlignment property that aligns the text in a control from TopLeft to BottomRight, and also middles. I know that using CSS you can align textual content using the div as a container.
I was wondering if there is a way to use the ContentAligment property values from a Windows form to set the div container css. So if the user selects MiddleLeft the text is aligned that way in the html markup.
Mark
|
|
|
|
|
|
Thanks for the link. I used a label control for the heading. That way I could change the alignment and the font. Works fine.
|
|
|
|
|
Hi,
I have a field called is_closed in MySQL table. It's a bit datatype which means it's 0 or 1
I want to know how to deal with it in PHP, like how can I (IF) it?
and is there any way to deal with it as if (is_closed == true)?
Thanks
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Is an ActiveX control that I include in my web application allowed by the browser to contact and download info from sites other than the one hosting my web application?
I understand that JavaScript is barred from contacting third-party sites, but is the ActiveX control also barred?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, ActiveX control also barred by 3rd party website.
|
|
|
|
|
Hi,
I am trying to insert email_header from include file but it's not inserting anything. How can I fix it please?
here is my file:
include 'includes/email_header.php';
$body .= "<h1>Dear Customer</h1><br>";
$body .= "<p>this is a test email.</p>";
$body = nl2br($body);
and this is the email_header.php:
$body = "hello.......";
$body .= "<br>";
$body .= "here is website logo";
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
Why I am getting the above error! it's making me crazy!
the url shown for this error on chrome is memberhome.php
I am not getting this error on my localhost but only getting it when I upload my website to the host
here is the code for it:
include 'includes/php_header.php';
require 'includes/connect2db.php';
if (!isset($_SESSION["member_loggedOn"])) { exit(header("Location: signin")); }
$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: signin")); }
while ($mysql_row = $mysql_query->fetch())
{
$member_title = $mysql_row["member_title_name"];
$member_full_name = $mysql_row["first_name"] . ' ' . $mysql_row["middle_name"] . ' ' . $mysql_row["last_name"];
$member_brief_introduction = $mysql_row["brief_introduction"];
}
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
I see in your code a redirection to signin in case of errors. It is possible that that rediretion brings you back to this page? (You may not see it on development machine, because you get no errors...)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
signin page has the following only:
if (isset($_SESSION["member_loggedOn"])) { exit(header("Location: member")); }
actually i noticed that thatraja is right. The site is showing properly on IE and safari but not on Chrome.
I asked my host to check..
I have one more question please.. why it;s not showing the exact error, file and line? is it possible to enable it to show such information on host?
Technology News @ www.JassimRahma.com
|
|
|
|
|
It's a client side error raised by the browser. It has no idea about code lines in your server side...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Hi,
I would like how to add a customer url include in php.
I tried the following but didn't work:
include $_SESSION["domain_name"] . 'includes/php_footer.php';
Technology News @ www.JassimRahma.com
|
|
|
|
|
You didn't share complete code-block. And saying "didn't work' won't help us to spot the issue. Hereafter give us complete details.
I think you're trying to include the dynamic file based on the session value. Check this post.
Dynamic inclusion in PHP[^]
FYI PHP include statement[^]
|
|
|
|
|
Hi everyone,
I am working on a project where I need to come up with a way to gather the end user's computer information to be used for IT purposes, all users will be on a intranet with no exposure to external users.
What is the best way to do this? I've seen mention in a few places to use Java or WBF Browser application.
Any tips/advice would be greatly appreciated.
For additional information, the type of data i need to pull is: domain\username, computer name, serial number to start.
Thanks again
- I changed one line of code and got 99 errors...
|
|
|
|
|
I've got a theme running on my wordpress site
that's powered by ajax and jquery and I've got
an issue with one of my posts where every
time I navigate around the website to that
particular post, it fails to load my thumbnails
in that post correctly unless I reload the page
manually in my browser or when I only type in
the post's url in my browser and then load on
its own without going through the main site
(ajax powered).
I would like to disable Ajax loading for just that
post/link and not the entire website. My
theme has a custom field for javascript and
jquery codes which requires the tag, if I'm
going to paste any codes in this field, there
should be a way to specify a link/url that
doesn't ajax-load right?
I already tried using some custom field
shortcode plugin to invoke a javascript page
refresh in the post but that didn't work until I
manually reloaded the post in my browser then
the shortcode was called and the post auto-
refreshed once.
I found somewhere that using this -> data-
ajax="false" in my page will work but I don't
know where or how to place it in that specific
post.
Is there a way I could add some ajax-
compatible code to my post that will reload
the page ONCE automatically when it has been
loaded?
-- modified 3-Nov-13 13:46pm.
|
|
|
|
|
Hi,
I have the following in my meta.php include file:
<meta name="DC.title" content="MyWebSiteName" />
it's the same for all except few file where I will have:
<meta name="DC.title" content="MemberName" />
is it possible to keep the:
<meta name="DC.title" content="XoomPage" />
in the meta.php include file but override it with:
<meta name="DC.title" content="XoomPage" />
in other specific pages?
How?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I have a PHP project. I want to know what's the best way to save the date for a post in MySQL so it can be shown in a local time of the user.
For example if the local time in 00:00 in UAE and it's 09:99 in USA and a user in based in UAE created a post it will show created in 00:00 but if a user based in USA viewed the same post it will show created in 09:00
I am not sure how to explain this more but hope it's clear..
Thanks
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Always (and I do mean always) store dates and times as UTC values. Only when you need to display them should you apply the local time zone offset of the user's system. How you do this depends on your application and language, and making the effort to do a little research for yourself would quickly lead you to http://www.w3schools.com/php/func_date_localtime.asp[^].
Veni, vidi, abiit domum
|
|
|
|
|
thanks Richard. One more question please..
I am currently using timestamp field in MySQL as created_date and assigning a default value CURRENT_TIMESTAMP.
Is it possible to use UTC_TIMESTAMP() for the timestamp's default value?
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|
Sorry, I don't know, but I'm sure Google will find you some suggestions.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I am trying to get an INOUT parameter from MySQl using PHP and PDO but getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 2 for routine xoompage.sp_send_password_reset is not a variable or NEW pseudo-variable in BEFORE trigger' in C:\xampp\htdocs\xoompage\password_reset.php:17 Stack trace: #0 C:\xampp\htdocs\xoompage\password_reset.php(17): PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs\xoompage\password_reset.php on line 17
here is MySQL sp:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_send_password_reset`(IN param_member_guid varchar(255), INOUT param_password_reset_guid varchar(255))
BEGIN
DECLARE param_password_reset_guid varchar(255);
SET param_password_reset_guid = UUID();
UPDATE members SET password_reset_guid = param_password_reset_guid, password_reset_date = DATE(NOW()) WHERE member_guid = param_member_guid;
END
and this is the PHP:
$mysql_query = $mysql_connection->prepare("CALL sp_send_password_reset(:param_member_guid, :param_password_reset_guid)");
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);
$mysql_query->bindParam(':param_password_reset_guid', $password_reset_guid, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);
$mysql_query->execute();
Technology News @ www.JassimRahma.com
|
|
|
|
|
I am new to MVC4. I am trying to issue ajax call on the button click to receive partial view with the loaded dropdown list. It looks like Ajax call never reaches controller's method GetMyList(). What is wrong with my code ? Thank you
//in mypage.cshtml
@model IEnumerable<MyProject.Models.MyModel>
@{
ViewBag.Title = "MyPage";
Layout = "~/Views/Shared/_MyLayout.cshtml";
}
<div>
....
<div>
<button id="btnGetList">Find</button>
</div>
<div id="divWithPartialView">
@Html.Partial("_MyPartialView", Model) // displayed on initial page load
</div>
...
</div>
@section MySection{
<script type="text/javascript">
$('#btnGetList').on('click', function (event) {
alert("go get list"); // shows up
var myName = "Jo";
$.ajax({
type: "POST",
url: "Main/GetMyList",
data: myName,
success: function (data) {
alert("list is here"); //does Not show up
$("#divWithPartialView").html(data);
}
});
alert("after ajax"); //shows up
})
</script>
}
// Controller
namespace MyProject.Controllers
{
public class MainController: Controller
{
............
[HttpGet]
public ActionResult MyPage()
{
List<MyModel> myList = new List<MyModel>();
return View(myList);
}
public ActionResult GetMyList(string myName)
{
MyModel mm = new MyModel();
List<MyModel> myList = mm.GetNames(myName); // using search criteria entered on the previous Application page
return PartialView("_MyPartialView", myList);
}
}
}
//Partial View: _MyPartialView.cshtml
@model IEnumerable<MyProject.Models.MyModel>
<label>Select your name:</label>
<select id="lstNames">
<option value="0">- select name -</option>
@foreach (var name in Model)
{
<option value="@name.id">@name.myName</option>
}
</select>
//Model
public class MyModel
{
public int id { get; private set; }
public string myName { get; set; }
public List<MyModel> GetNames(string myName)
{
List<MyModel> myList = new List<MyModel>();
//code to find names that start with "Jo"
return myList;
}
}
|
|
|
|
|
|
Hi,
I want to ask how can I set the following in PHP with the current date to expire the page immediatelly?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Technology News @ www.JassimRahma.com
|
|
|
|