|
|
I googled all weekend, and never stumbled on a way to do these two things:
0) I want to pre-decorate all required fields with a red border (as opposed to an asterisk) when the form loads.
1) I want to validate on the fly, as the user types in the fields, and selects in drop downs.
If anyone can direct me to one or more pages that describes either or both of these things, I'd appreciate it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
good job! I have been looking for this information for a long time 192.168.l.l
|
|
|
|
|
I have the brilliant idea that I want to write a html/js/css webpage from scratch.
My current issue is with bundling, or for development unbundled auto added files.
Is there a way that on the HTML that the script tag for external .js files could be written once?
<script src="scripts/*.js"> </script>
Using VS Code with Live Preview extension.
Are the "best" options going to be use node/php/aspnet?
With asp.net applications I am familiar with and would love something similar like the bundling functionality.
If in debug - then each file of the bundle is included as individual script links, allowing for debugging.
Then switch to prod, and becomes 1 file.
But the bundler also allows for wildcards, making any new files created added into the bundle.
|
|
|
|
|
What about bundling your external JavaScript files into one file, using a bundling tool (like webpack) and, write one script tag for the bundled file?
|
|
|
|
|
|
I know that you experiment with shampoos,conditioners, and other products for hair care to learn how to take care of your hair . what do you experiment with for web design to learn how to build and design beautiful or etc. blogs ?
|
|
|
|
|
Start with defining some minimum parameters that you need. Not "wants" but "needs".
Do you want raw code editing to allow for those little tweaks?
Or if ok limited to GUI edits?
Integration support to other services? Face/Twitter?
Custom Domain options?
...
Form with list and hopfully will help when scanning through a list of top 10 web blogs makers, you can tweak or skip testing a bunch of things.
Keep in mind to separate your Needs and Wants.
|
|
|
|
|
Is it possible to copy values from an Excel column and paste it to a specific column at a specific point in an aspx GridView.
|
|
|
|
|
Assuming you've set the GridView up so that every cell contains a textbox, you can use Javascript to handle the paste:
Copy and paste from excel spreadsheet into HTML table with cloned rows using Javascript? - Stack Overflow[^]
$('<%= YourGridView.ClientID %>').on('paste', 'input', function(e){
var $this = $(this);
$.each(e.originalEvent.clipboardData.items, function(i, v){
if (v.type === 'text/plain'){
v.getAsString(function(text){
var x = $this.closest('td').index(), y = $this.closest('tr').index();
text = text.trim('\r\n');
$.each(text.split('\r\n'), function(i2, v2){
$.each(v2.split('\t'), function(i3, v3){
var row = y + i2, col = x + i3;
$this.closest('table').find('tr:eq('+row+') td:eq('+col+') input').val(v3);
});
});
});
}
});
return false;
});
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for the assist will check it out.
|
|
|
|
|
I have this method on my controller
[HttpGet]
public Response<List<OperatorEntity>> GetAllChangedOperators(string instrumentName)
{
return GetBL().GetAllChangedOperators(instrumentName);
}
When I call it I get "No action was found on the controller 'Operator' that matches the request."}.
If I remove the parameter then it works fine. if I embed the parameter name inside a class and call it passing the object - that also works.
What's wrong with this??
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
How are you passing the parameter? For a GET request, it should be in the querystring:
https:
NB: You can use a tool like Fiddler[^] to view the details of the request and response.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Does Ejs template only work with get request because as in my code when I'm using it with GET request it is totally working. IF it is yes, then how can I route my ejs page with POST request because when I am using it with POST request it says CANNOT GET error.
|
|
|
|
|
I have an ASP.Net Web API. When I run it locally it works fine. I installed it on a server in IIS.
When I run http://192.168.51.74:8092 I get the file listing, so it looks like it's seeing the site.
When I try to hit a controller, like http://192.168.51.74:8092/api/Operator/GetAllOperators/, I get a not found.
I'm pretty new to this. Anyone know what I'm doing wrong? How do I debug this?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Unfortunately, there are about a thousand possible causes for this.
A big one is the configuration of the AppPool that you're using. It should be set for Integrated, 4.0+, and if you compiled your app for "Any CPU" you'll need select advanced settings and set the "Enable Support for 32-bit applications" to true.
Or it might be that the appropriate handlers or modules aren't being loaded. A common work-around for that is to go to the project web.config and add this attribute to the system.webservser.modules attribute runAllManagedModulesForAllRequests="true".
Or something else. I hope you're getting traction on this!
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
I'm working on simple crud in laravel.I already built Controller,form, and model.But everytime i click the submit input.They always return this url and show 404 not found error,instead of insert the data.Can someone help me to find the problem?i have no clue about this part.
http://127.0.0.1:8000/POST?_token=bD5c3O0XpfTX7NWL7RA7wXSw3rWrQ12fbGLMw0kf&kode=galih&nama=galih&submit=Submit[^]
I set the route using Route::resource('urusan','MasterUrusanController)
Insert Form
<form action="POST" action="{{url('urusan')}}">
{{ csrf_field() }}
<table>
<thead>
<tr>
<td>Kode Urusan</td>
<td><input type="text" name="kode"></td>
</tr>
</thead>
<tbody>
<tr>
<td>Nama Urusan</td>
<td><input type="text" name="nama"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" class="btn btn-primary" value="Submit"></td>
</tr>
</tbody>
</table>
</form>
Insert Form
<form action="POST" action="{{route('urusan.update',$urusan->kode_urusan)}}">
{{ method_field("PUT") }}
{{ csrf_field() }}
<thead>
<tr>
<td>Kode Urusan</td>
<td><input type="text" name="kode" value="{{$urusan->kode_urusan}}"></td>
</tr>
</thead>
<tbody>
<tr>
<td>Nama Urusan</td>
<td><input type="text" name="nama" value="{{$urusan->nama_urusan}}"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" class="btn btn-primary" value="Update"></td>
</tr>
</tbody>
</form>
</table>
Controller
class MasterUrusanController extends Controller
{
public function index()
{
$urusan=MasterUrusan::all();
return view('master_urusan.select',['urusan'=>$urusan]);
}
public function create()
{
return view('master_urusan.insert') ;
}
public function store(Request $request)
{
$data=new MasterUrusan();
$data->nama = $request->get('kode');
$data->nama = $request->get('nama');
$data->save();
return redirect('/urusan');
}
public function edit($kode_urusan)
{
$data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
return view('master_urusan.update', ['urusan' => $data]);
}
public function update(Request $request,$kode_urusan)
{
$data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
$data->nama = $request->get('nama');
$data->save();
return redirect('/urusan');
}
public function destroy($kode_urusan)
{
$data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
$data->delete();
return redirect('/urusan');
}
}
modified 12-Mar-19 5:47am.
|
|
|
|
|
Galih indra waspada wrote:
<form action="POST" action="{{url('urusan')}}">
You've specified the action attribute twice. The first one should be method :
<form method="POST" action="{{url('urusan')}}">
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi
I use below command On my app for making a password-protected zip file.
def make_zip_heroku(filename,zip_file_pw):
""" This is just usual zip app that exist on ubuntu/linux/etc """
print("Start make zip archive")
zip_file_pw = "-P "+zip_file_pw
OutPutArchive = str(filename)+".zip"
rc = subprocess.call(['zip', OutPutArchive, filename, zip_file_pw, '-9'])
return OutPutArchive
make_zip_heroku("some_file","123")
after zip file saved.. i use an API and upload file to remote server and access it in my PC
But Problem is :
I can't open file with password "123" that i set.
1- I check checksum of my file when created by server and check it when i download my file on windows..
checksum string is same...
2- My zip file size is 80 MB
3- maybe zip command make archive using ..i dont know what method of archiving that can't be work on windows..
Thanks.
|
|
|
|
|
I've been banging my head against what should be an incredibly trivial action -- popping up a "Please wait" dialog (with or without a progress indicator) while a long-running process happens from a System.Web.UI.Page object.
The basic launch is from a button handler routine in my code-behind:
Protected Sub GoBtn_Click(sender As Object, e As EventArgs)
OpenPopup()
DoMenuGeneration()
GenerateStatusDivVisible = False
ClosePopup()
End Sub
DoMenuGeneration() is the long task, it launches an external application (twice even) and blocks until the process is complete.
OpenPopUp() and ClosePopup() have taken many forms, the most promising were AjaxToolkit-based functions fired by javascript using ScriptManager.RegisterStartupScript, but while those popups *can* be made to auto-magically pop up based on a client-side button on the page being clicked, I cannot mimic that click through the ScriptManager. I either get an error (cannot find the control) or simply nothing happens as the code line is executed.
The first attempts were the most simplistic, the "pop-up" is just a named DIV tag with runat=server, and I manipulate the Visible property. As far as I can tell, the page simply doesn't render in between, so making the DIV visible has zero effect.
I've tried at least three different "solutions" given on the web ... so far none have even come close to working properly. I have tried:
So far ... nothing has worked.
Thanks in advance!!
|
|
|
|
|
Consider what is happening:
- You click the button;
- The browser posts the form to the server, and waits for a response;
- The code behind, which runs on the server, receives the request, and:
- Registers a startup script to display the dialog;
- Runs the lengthy process;
- Registers a startup script to close the dialog;
- Renders the response and sends it back to the browser;
- The browser receives the response and replaces the document.
- The browser executes the two startup scripts, displaying and immediately closing the dialog.
What you want to happen:
- You click the button;
- A Javascript method displays the dialog;
- The browser posts the form to the server and waits for a response - preferably using an AJAX request or an UpdatePanel;
- The code behind, which runs on the server, receives the request, and runs the lengthy process;
- The browser receives the response and updates the document;
- A Javascript method closes the dialog.
3 Different Ways to Display Progress in an ASP.NET AJAX Application | DotNetCurry[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
or not as expected.
if you look at this site[^] (dutch website)
I would like to have the tab content (made in JQuery) with a margin of around 25 pixels on either side (left and right) of the page, regardless of the content. (so it moves with the size of the browser).
For now, I did a dirty fix by setting the min-width to a certain amount of pixels, which is not what I want, but otherwise the width would adapt to the content of the tab. For the tab "programma" eg. only half the width of the page would be filled, the rest is the background image.
No matter what I did in the css, nothing worked. (although it looks trivial)
So what do I need to do to
* remove the fixed pixel width
* make the tab content as wide as the page (with a small offset of say 25 pixels left and right.
It COULD be the JQuery css that's messing things up, but I'm not a css/jquery wiz unfortunately.
the short HTML:
<body>
<div id="divparent"><br />
<div class="header"> title, social media stuff, ... </div>
<div class="main">
<div id="tabs">
<ul>
<li><a href="#tab-home">home</a></li>
<li><a href="#tab-club">club</a></li>
<li><a href="#tab-programma">programma</a></li>
<li><a href="#tab-inschrijvingen">inschrijvingen</a></li>
<li><a href="#tab-gedragscode">gedragscode</a></li>
<li><a href="#tab-info">informatie</a></li>
<li><a href="#tab-kalender">kalender</a></li>
<li><a href="#tab-faq">FAQ</a></li>
<li><a href="#tab-contact">contact</a></li>
</ul>
<div class="tabcontent"><!--</div>
</div>
</div>
<div class="footer">footer contents</div>
</div>
</body>
the css:
div.header { display: inline-block; }
div.main { margin: 0px 0px 0px 0px; }
div.tabcontent { margin: 0px 0px 0px 0px;min-width:1200px; }
div.footer { text-align:center;font-size:small;border-top:1px solid #F0F0F0;background-color:#1E1E1E;}
div#divparent { margin: 25px 25px 25px 25px; }
div#tabs { }
many thanks for your help !
modified 11-Mar-19 9:10am.
|
|
|
|
|
You have position:absolute; on the <body> element. If you remove that (and the min-width hack), the tab fills the width of the screen.
If you genuinely need the body to be absolutely positioned, you'll need to force the body width by adding min-width: calc(100vw - 26px); to it. But that's slightly hacky, since 100vw includes the width of the vertical scroll-bar, and there's no simple way to account for it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
body was indeed working in the back of my mind, though I was convincing myself the div would override the body.
The background was moving, but I fixed that with adding background-attachment: fixed; and the site looks far better now!
thanks!
|
|
|
|