|
It's unlikely they intend that page\response to be shown to the client. What normally happens is that response page happens as a "background" post to your site directly, it is never sent to the client. So the flow will probably be something like
1. Instigate the payment on your site
2. a request is sent to your hidden request url
that page will read the data from the request and update the database to say if the payment worked or not
3. the payment provider will return the user back to your site (probably, I haven't read the docs)
4. the page the user is returned to checks the database (that was updated in step 2) to see if the payment worked
They are shown a success or fail message, or if the background request has not been process yet show a message that will explain your payment is still being processed.
|
|
|
|
|
I don't even know what to call it.
I have a record row that is 100% width that shows a record. I want to add a Red Square on the right side to delete the record if I choose to offer that option. I was thinking maybe there's a way without me having to write another set of classes in which I can modify the class.
|----------------------|
| 100% |
|----------------------|
|---- ----------|--|
| 90% | 10% |
|---------------|--|
This is the original class
div.iRecord {
width: 88%;
margin: 0 1%;
padding: 2% 1%;
display: inline-block;
float: none;
}
And this would be the override class, in which I was wondering if it's possible to use the class below to modify the class above, just change the width to 89%
div.iRecord.delete {
width: 9%;
height: 64px;
display: inline-block;
vertical-align: middle;
background-color: rgb(255, 0, 0);
}
|
|
|
|
|
It's not entirely clear what you're asking - the CSS example you've posted completely changes the style of the same <div> element depending on whether or not it has the delete class, but that doesn't seem to match the earlier description.
Perhaps you could create a simple example in JSFiddle[^]?
Based on your description, and assuming you're using a modern browser[^], I'd be inclined to use Flexbox[^]:
<div class="record">
<div class="data">
Data goes here
</div>
</div>
<div class="record">
<div class="data">
Data goes here
</div>
<div class="commands">
Commands go here
</div>
</div>
<div class="record">
<div class="data">
Data goes here
</div>
</div>
.record
{
display: flex;
}
.record > div
{
padding: 10px;
outline: 1px dotted blue;
}
.record .data
{
flex-grow: 1;
}
.record .commands
{
width: 10%;
background: #a00;
color: #fff;
}
Example[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I've never heard of flexbox. I decided to make a copy of the CSS file and push forward with it, while trying various ways such as min-width and max-width. And making the giant red delete button turned out much harder than expected.
I guess I should of said that I was trying to emulate the iPhone interface, in which you can delete records using the giant red button.
I'll give your idea a spin today and let you know how it works.
My customers are pushing me to create sliding rows, in which you can swipe left, and the red delete button shows.
|
|
|
|
|
i can't understand your whole problem but i think this line can solve it.
add float:left in div.iRecord.delete
|
|
|
|
|
I was trying to achieve multiple widths, inline. based on an option to add a 3rd inline element, but still equal the same width.
|
|
|
|
|
Hello there , i finished programming my site in php i want create page or comfort with phone screen , second things is i want protect admin page when i write the url it goes to control panel i want ask for user name and pass thanks
|
|
|
|
|
Hi there.
That's great. If you hit a problem with that then feel free to post the code you are struggling with, explain the issue and we will try to help.
|
|
|
|
|
|
Not until you explain exactly what your problem is.
|
|
|
|
|
please explain the issue, i can't understand what you want to say.
|
|
|
|
|
Is it possible to set the source of an img to an url where the url will be redirected?
Basically I have an API that can be called and depending on the parameter an image is returned.
When I browse to the API page I get the image correctly, but when calling it from a page with:
<img src="http://server.com/apipage.php" />
I get nothing. When using an iframe instead of img with the same url, it works.
any ideas on how to achieve this? I googled, but it looks like not immediately possible?
(perhaps because of security reasons?)
|
|
|
|
|
Images pointing to URLs that redirect to the real image should work fine in all browsers.
Try using the browser's developer tools, or something like Fiddler[^], to trace the network requests to see what's going wrong.
Also, if you have any browser plugins installed, try loading the page with all plugins disabled.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
actually, I made a quick prototype:
index.html
call.html
ship_256.png
all files in the same directory.
in index.html I call the call.html page
<img src='call.html' />
and call.html looks like this:
<html>
<script>window.location.href = "ship_256.png";</script>
</html>
When I open the call.html page I get the ship_256.png file, but when going through index.html I get nothing.
Also tried chrome incognito window (should disable extensions), no dice.
|
|
|
|
|
Using Javascript to do the redirect means that the browser has to load the page as HTML and render it - it's expecting an image, so I'm not surprised that it doesn't work.
Your first message showed you using a PHP file - you can do a header redirect from PHP to load the image. The header() manual page has examples of redirects using the Location: header.
|
|
|
|
|
thanks, it looked promising, but unfortunately you cannot use includes etc... which I need.
|
|
|
|
|
If you redirect using a 3xx status code, the image will load correctly.
If you try to load an HTML document as an image, and then use script within that document to change the location, it will not work.
The redirect needs to come from the server.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This is the final solution and it looks like it is working
<?php
ob_start();
function __autoload($class){
include_once($class);
}
foreach (glob("./*.php") as $filename){
if($filename != "index.php"){
__autoload($filename);
}
}
ob_get_clean();
if(isset($_GET["parameter"])){
$imgname= str_replace("\"", "", str_replace("\\", "", functioncall_to_other_page()));
$fp=fopen($imgname, 'rb');
header("Access-Control-Allow-Origin: *");
header("Content-Type: image/png");
header("Content-Length: " . filesize($imgname));
fpassthru($fp);
}
exit;
?>
took me a while and some help to get it .
It will be "fun" to get this working because the page should return different content depending on the parameters. This was just "step 1".
|
|
|
|
|
Hi could anyone please guide me on how to pass a value through a URL and retrieve the same from the URL.
i'm completely new to this please help me..
|
|
|
|
|
This forum is for suggestions and bugs you find in CodeProject, not to ask for code support. Please try Quick Answers[^].
This forum is the right place.
modified 24-Jun-16 5:55am.
|
|
|
|
|
Sir, My boss is asking to deployment Presentation Tier On one server, Business layer on second server, Data Access Layer on third server for the same application and we want to use load balancing for that application. Is is possible and will I get advantage of this concept. If it is possible, Kindly help me the method and also suggest me load balancing for the application in different servers.
Regards,
Shankar Chaurasia
|
|
|
|
|
Load balancing is needed when you have more than one physical computers of the same kind (the same layer on multiple tiers). For instance 2 servers with the DAL installed on it and you want to balance the load on them...
As long as you have a single layer on a single tier there is no room for load balancing...
Writing a load balancing system is a fairly complicated issue and I would not advise anyone to do it as a 'side project'...
The most basic load balancing is working on the idea of hand out the incoming request equally between the servers. A possible second layer could be when the load balancer check how many request still active on each server (some request may take more time to finish) and hand out the next request to the lowest. In a more sophisticated scenario the load balancer should check the actual resource usage of a server and use that as the hand out point...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I am currently working on a website with a friend and we want to support users logging in. Security is not a top a priority. We have HTML and JavaScript code which will extract the User's name and password. We want to use an object of XMLHttpRequest to call the server to verify the user. We would use a post. Does this approach make sense?
If there is a better approach, I would like to know what it is. However, we do not want to use jQuery, ASP.Net or a relational database.
I am now thinking that this should have been posted to the JavaScript forum. If so, I will post it there.
Bob
|
|
|
|
|
You've told us what technologies you don't want to use on the server, but you've forgotten to tell us what technologies you do want to use.
If you're going to call the server to validate the credentials, you'll need some code running on the server, and somewhere to store the usernames and salted-and-hashed passwords. You need to decide what you're going to use for both of those before you can work out how feasible your solution will be.
Making an AJAX post will be no less secure than a regular form post. However, I would strongly recommend installing an SSL certificate, and only serving your site over HTTPS. You can probably get a free certificate from StartSSL[^] or Let's Encrypt[^].
NB: Don't store the passwords in plain text, even if security isn't an issue for your site. Lots of people reuse the same credentials on multiple sites, so if your site is hacked, you could be exposing their on-line banking password!
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard,
Thanks for the response. We are planning on writing the server code in C++.
From what I gather from your post, what you are telling me is that what I suggest will work. Do I have that right?
Thanks
Bob
|
|
|
|