Unleashing the power of the open form reveals a newly resized window

<script type="text/javascript">
function openSmallWindow() {
    ..
    // Specify URL, window size and attributes
    window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300, height=300');
    return true;
}
</script>
<div class="form-outer">
<div class="resource-form">
<h3>National Price-Look Up Tool - Get Prices Here!</h3>
<h4>Powered by ComparativeHospitalData.com</h4>
<form action="http://isivmwebtest.isolutionsinc.com/ComparativePricing/Gateway.aspx" method="post" onsubmit="return openSmallWindow()">
<input type="hidden" name="RemoteAction" value="PriceLookup" />
<strong>Enter HCPCS Code(s)</strong><br />
<input onfocus="this.value=''" type="text" name="codes" value="XXXXX or XXXXX,XXXXX or XXXXX-XXXXX" /><br /><br />
<strong>Enter HCPCS Description</strong><br />
<input onfocus="this.value=''" type="text" name="desc" value="partial name okay" /><br /><br />
<input type="submit" value="Search" />
</form>
<span style="font-size:0.8em;font-style:italic;padding-top:10px;">*Performing a search will redirect you to another page.</span>
</div>
</div>

I've been struggling to make this form show results in a small popup window. I've experimented with various methods but nothing seems to work. Currently, I'm using JavaScript to try and achieve this, but it's not functioning as expected. Can someone provide assistance?

Answer №1

Aside from width and height, there are additional parameters that can be included in the specs parameter. Find more information here: http://www.w3schools.com/jsref/met_win_open.asp

To reduce the size of the window, you have the option to remove the title bar, status bar, and other components.

For example, you can try this code snippet:

window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300,height=300,location=no,menubar=no,status=no,toolbar=no');

Answer №2

The essential "RemoteAction" hidden field is crucial for the popup to successfully redirect to PriceLookup.aspx. This missing element is likely causing the incorrect display of your popup.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Creating a dynamic form in Django that allows users to input text and insert images using AJAX technology

My goal is to develop a website for creating articles that go beyond the standard models.TextField setup commonly used with Django. I want users to have the ability to add an arbitrary number of text and image fields to their articles, while also ensuring ...

Launching a new window and displaying content across 2 separate tabs

Currently, I am incorporating both angular js and javascript within my application. An issue that has arisen is that when I click on the <a> tag, it triggers a method in an angular controller which contains $window.open();. The problem lies in the fa ...

Arranging an Array Object in Javascript by Date

Although similar questions have been addressed in other posts, my specific situation appears to be unique due to the data I am receiving from Twitter. Here is the logic I am currently using to sort the JavaScript Array object. However, the issue seems to ...

Swap out images by clicking on a link with the corresponding number in the ID using jQuery

I have a list of links with unique IDs and a class named "load". What I want to do is change an image on the page based on the ID of the link that was clicked. I have prefixed all image IDs with 'folderid[number]'. Here's what I've tr ...

Stop Ajax requests when there are blank spaces in Typeahead.js

I've been experimenting with typeahead.js and utilizing the BloodHound remote feature to load data. Everything is functioning properly, except that when I input only spaces in the textbox, typeahead still makes an ajax call. I'm wondering if th ...

Connecting events across various browsers

In a function, I had to add an event to an element called newElement. To cater for different browsers like IE and Firefox, I checked the condition based on the attachEvent property (only works in IE). if ( typeof(newElement.attachEvent) != "undefined" ) { ...

React: The error message "p is not defined" is showing up in the component file due to the no-undef

In my React application, I am looking to display a list of menu items from an array and show the detailed description of each item upon clicking. The array of menu items is stored in a separate file called dishes.js. The menu items are rendered using a Me ...

Building dynamic 3D scenes using JSONLoader in Three.js and Angular4

Having trouble integrating a JSON file into an Angular 4 environment using a JSONLoader. The path to the JSON file is correct, but I can't add it to the scene. I'm receiving an error "cannot set property 'mesh' of undefined" on the line ...

Retrieve JSON Object using a string identifier

I created a script that takes the ID of a link as the name of a JSON dataset. $('.link').click(function() { var dataset = $(this).attr("id"); for (var i = 0; i < chart.series.length; i++) { chart.series[i].setData(lata.dataset ...

Adjust object values dynamically with TypeScript by identifying the corresponding keys

Currently, I am in the process of creating a function in TypeScript that will return another function allowing me to modify the keys of an object. This specific function is intended for use within a React reducer. For instance, if I have a state object wi ...

Unexpected results: jQuery getJSON function failing to deliver a response

I am facing an issue with the following code snippet: $.getJSON('data.json', function (data) { console.log(data); }); The content of the data.json file is as follows: { "Sameer": { "Phone": "0123456789", }, "Mona": { "Phone": ...

Error message: "Root resolution error encountered". Need assistance in granting watchman access?

After setting up a react-native starter project, I was prompted to allow watchman access to my system's files. Unfortunately, I declined and now whenever I try to run the folder, I encounter the following error: Error: unable to resolve root /Users/ck ...

Is it possible to use AJAX in JavaScript to dynamically update page titles?

When loading a new page using AJAX, I am having trouble updating the title. The expected titles should be "Home", "About", and "FAQ". I attempted to solve this by changing the title with the code snippet below, but it only resulted in displaying "undefine ...

Uploading a screenshot to a server using Ionic 4

I have encountered an issue while trying to take a screenshot and upload it to a server using the spring-boot. I utilized a native library for taking the screenshot and an Angular service to obtain the image URI. I converted the image URI to a blob and sen ...

Building an object in React using JavaScript: A step-by-step guide to including all necessary fields

I am working on a Sign-up page where I console log the input values from each field when the 'Sign Up' button is clicked. However, I want to combine these individual values into one object in the console. If anyone can provide assistance with thi ...

What is the best way to extract a JSON object from a website search using getJSON or similar techniques?

Can anyone provide guidance on utilizing .getJSON() to access JSON-encoded information from a website that is being searched? I've implemented a Google Custom Search API for my site with the aim of retrieving the JSON file from the search results. Fo ...

I need help figuring out how to mention an id using a concatenated variable in the jquery appendTo() method

Using jQuery, I am adding HTML code to a div. One part of this code involves referencing a div's ID by concatenating a variable from a loop. $(... + '<div class="recommendations filter" id="recCards-'+ i +'">' + &apo ...

NG8003 error: ExportAs 'ngForm' directive not found in the system

I encountered an issue with my first Angular 11 project: No directive found with exportAs 'ngForm'. Despite importing FormsModule and ReactiveFormsModule in app.module.ts, the error persists. Here is the code snippet: This is from product.compon ...

What is the simplest method for comparing transaction amounts?

I'm in the process of integrating PayPal into my website using their REST API. My goal is to allow users to input the amount they want to deposit. While I can obtain the total during payment creation, I'm unsure how to smoothly pass it to the exe ...

Create a function that triggers a fade-out effect on one button when another button is clicked

Hello everyone! I'm still getting the hang of things around here so please be kind. I need some assistance with my weather app project. Specifically, I've created two buttons and I want to make it so that when one is clicked, the other fades to g ...