|
Hi,
I have a 3 step survey, from where in on each step we are collecting some values.
Each step is created as a panel, and set visible to false, enabling them in the code as required.
On Step 3, there are about 5 questions the user needs to complete, upon which an account is created. So, on the button click of this final step, for some reason all the values in this panel are lost when i try to get the values,
CheckBoxList chkbxChk = (CheckBoxList)pnlQuestions.FindControl("cbl_" + qa.questionid);
It appears as though on button click does not remember the values from panel?
any ideas?
Thanks!
|
|
|
|
|
Hi,
in PHP, how can I check if the QueryString $_GER
1. Exists in the url.
2. Exists with value
3. Exists without value
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
This article may help: http://www.codeproject.com/Tips/677867/Code-Experiment-on-_GET
|
|
|
|
|
if the url has "http://www.example.com/index.php?solution=solved"
You can check:
if(isset($_GET['solution']))
echo 'its set And the value of "solution" is: ' . $_GET['solution'];
else
echo 'NOT set! ;
|
|
|
|
|
Hi,
I need to create a graph (a linear graph) in a project of mine.
My company only uses IE8.
I checked over the net and saw that SVG is not supported in IE8 however I'm seeing SVG when I'm surfing in IE8 (when I look in the source ) so I don't understand the contraindication.
Is SVG supported or not and if not, is there a way for me to create a linear graph? I saw an example using CSS but it's too complicated and I wanted to know if there's something simpler.
Thanks
|
|
|
|
|
Regardless of IE version, creating SVG using IT is not an option. I can't imagine what you mean by "IE" in terms of creating anything. "Save As" possibly? But anyway, per SVG, check out:
http://inkscape.org/download/[^]
Tons of fun. Coming your way. SVG away!
|
|
|
|
|
Thank you for the resposne but I didn't get an answer to my question.
I can see the SVG works on IE in different versions.
My question is again regarding IE8.
Using an open source editor is not an option in my situation.
If you look at sites that do use SVG with IE8 compatibality mode it does display them. I want to know how it is done.
I found a JS library that I'm going to check:
http://raphaeljs.com/[^]
I'll update...
Thanks
|
|
|
|
|
Hello ThetaClear,
You posed an interesting question, specially for the fact that you say to me able to see SVG while on IE8.
So after some research what I've found out is that for most case, people are using a PNG as a fallback for users browsing with older browsers. In your case, which is probably more complex, there is an option for a web API called SVGWeb or a replacement with html and JavaScript.
That is what I can tell you without knowing much more about your graph project.
Good Luck
Source:
http://alchemise.net/wordpress/?p=225[^]
http://www.rustybrick.com/svg-support-for-internet-explorer.html[^]
http://css-tricks.com/svg-fallbacks/[^]
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
Thanks for the answer.
Since Raphael is using VML as a fallback if this IE8 or below I guess that what makes the browser display it.
|
|
|
|
|
No problem,
I'm also learning about it, so it was that much of a stretch from where I'm reading
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
Hi Guys,
One of those days when i have to start a new assignment and i feel a little uncertain about which path to go.. CROSSROAD.
I did a decent amount of web application development using Asp.net, from framework 1.1 to 4.0, then moved to Silverlight for nearly 2 years due to my assignments. haven't got a chance to work with MVC so i am kind of MVC virgin. so as to say, i am a Razor engine virgin too.
Now i have an opportunity to work on a Web application (not Silverlight based), and looking at options at hand, I am uncertain what would be a good way to go ahead.
1) should i go with just pure (HTML5 + JavaScript) way while consuming data via services
2) or should i do a HTML5 + Razor engine path, while data is still to be consumed via services.
I am inclined towards option 1, pure HTML5 and JavaScript for development, but should i be too worried about getting into JavaScript horror house? or should i look towards Razor engine to be a more promising one?
Some light please..
|
|
|
|
|
Hi,
I checked on the net and found that decryption sha256 php is not possible.
then how can I implement Password Reminder option?
please advise...
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
SHA is not an encryption algorithm; it is a one-way hash algorithm[^]. That means you cannot "decrypt" the hashed password.
(Technically, you could try a brute-force attack, but unless the hashed data is very simple, this could take a very long time.)
If the user forgets their password, you can't recover it. You'll have to reset it instead.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am VERY new to using WepAPI, and I have a problem. This might be a bit long, but I'm not sure what to post...
I'm using RestSharp....
I created a controller called AppSecurityController. It wraps calls to my security API. In it is a Login method:
The problem is that in the Login method, the Credential parameter is always null.
[System.Web.Http.HttpGet]
public LoginResponse Login(FMG.Entities.CredentialEntity Credentials)
{
Marois.Common.AppSecurity.Entities.CredentialEntity credentials = new Marois.Common.AppSecurity.Entities.CredentialEntity
{
UserName = Credentials.UserName,
Password = Credentials.Password
};
LoginResponse response = appSecurityBL.Login(credentials);
return response;
}
My solution has a project called Entities. In it is the Credential class:
[Serializable]
[DataContract]
public class CredentialEntity : _BaseEntity
{
[DataMember]
public string Password { get; set; }
[DataMember]
public string UserName { get; set; }
}
In my client project I have local models, which also has a CredentialModel:
namespace FMG.UI.WPF.Shared.Models
{
public class CredentialModel : _BaseModel
{
public string Password { get; set; }
public string UserName { get; set; }
}
}
I call to the WebAPI through a proxy class:
public LoginResponseModel Login(CredentialModel credentials)
{
WebAPIExecutor webAPIExecutor = new WebAPIExecutor("/AppSecurity/Login/", Method.GET);
webAPIExecutor.AddParameter(credentials);
LoginResponseModel results = webAPIExecutor.Execute<LoginResponseModel>();
return results;
}
WebAPIExecutor is a class for handling the RestSharp stuff:
public class WebAPIExecutor
{
#region Private Fields
private RestClient client;
private RestRequest request;
#endregion
#region CTOR
public WebAPIExecutor(string url, Method method = Method.POST)
{
if (string.IsNullOrEmpty(url))
{
throw new ArgumentNullException("Url");
}
setupServerURL();
client = new RestClient(ServerAddress);
client.AddHandler("text/plain", new JsonDeserializer());
request = new RestRequest(url, method)
{
RequestFormat = RestSharp.DataFormat.Json
};
}
#endregion
#region Public Methods
public void AddParameter(object value, string name = "")
{
if (value == null)
{
throw new ArgumentNullException("value");
}
Type type = value.GetType();
bool isPrimitive = type.IsPrimitive;
if(!string.IsNullOrEmpty(name) || (isPrimitive || type == typeof(string) || type == typeof(decimal)))
{
if (string.IsNullOrEmpty(name) && request.Method == Method.GET)
{
throw new ArgumentNullException("Parameter 'Name' cannot be empty for Get requests");
}
request.AddParameter(name, value);
}
else
{
request.AddBody(value);
}
}
public T Execute<T>() where T : new()
{
IRestResponse<T> result = client.Execute<T>(request);
int resultValue = (int)result.StatusCode;
if (resultValue >= 299)
{
string message = string.Format("An error occured calling the WebAPI. {0} The status code is '{1}'. {2} The error message is {3}",
Environment.NewLine, result.StatusCode, Environment.NewLine, result.Content );
MessageBox.Show(message, "WebAPI Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
throw new Exception(message);
}
return result.Data;
}
public void Execute()
{
IRestResponse result = null;
try
{
result = client.Execute(request);
int resultCode = (int)result.StatusCode;
if (resultCode > 299)
{
string message = "the error message";
throw new Exception(message);
}
}
catch (Exception e)
{
throw e;
}
}
#endregion
}
The parameter is being added with AddParameter and appears to be correct. The controller method is marked as HttpGet.
When I call from the proxy, through the WebAPIExecutor, I reach the controller and the parameter is null.
I'm am really clueless as to why the parameter is null in the controller. Can someone see what I'm doing wrong?
Many thanks
If it's not broken, fix it until it is
|
|
|
|
|
Hi,
I have a php file with jquery button like this:
<button id="btnContact" style="width: 140px" >
and:
$(function() { $( "#btnContact" ).button(); });
$('#btnContact').click(function() { window.location = 'contact_member.php'; });
I want to make the window.location as:
contact_member.php?id= + <?php echo $_GET["id"]; ?>
How can I do this please?
Technology News @ www.JassimRahma.com
|
|
|
|
|
1. Use the correct forum.
2. You really need to get hold of a PHP reference.
Veni, vidi, abiit domum
|
|
|
|
|
With a little search, there is a JS function that parse the URL and you can get the "id" value
|
|
|
|
|
Hi,
I would like to ask why I am getting the above error for this code:
if (isset($_GET['msg'])) { $mailbox_message = $_GET['msg']; } else { $mailbox_message = ""; }
then:
if (!strlen($mailbox_message)) { $mysql_query->bindParam(':param_message_mailbox', $mailbox_message = NULL, PDO::PARAM_NULL); }
else { $mysql_query->bindParam(':param_message_mailbox', $mailbox_message, PDO::PARAM_STR); }
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I would like to ask what's the best way to expire a login PHP session after sometime when it's idle?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Given all these questions, do you think a book on PHP would be a good investment?
Veni, vidi, abiit domum
|
|
|
|
|
Hereafter please use PHP forum[^] for php questions.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
Hi,
I have an input text control in my php page to allow user to enter thei profile address url which will be like this:
wwww.mydomain.com/PROFILE.ADDRESS
I want to know how can I let php validate it for me so only valid characters will be allowed such as alphabits, numbers, . (dot) and _ (underscore)?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Use a regular expression:
$ismatch = preg_match('/^[\w.]+$/', $input);
if ($ismatch) {
echo "Valid";
}
else {
echo "Invalid";
}
Hope this helps.
|
|
|
|
|
thanks but is it possible to have it validated while typping (while text changed) just like ASP.NET or only when form is posted?
Technology News @ www.JassimRahma.com
|
|
|
|